PDA

View Full Version : Reading AVI frame via DirectShow in Delphi


kovi
23rd May 2005, 16:37
I've been using the VFW interface to read bitmaps from avi files so far.
The problem is that most users don't have right vfw codecs installed only directshow filters. So my programs don't really work.
I'm looking a way to do this via DirectShow filters.
I program in Delphi (4).
Any suggestion would be appreciated.

Thanks!

esby
23rd May 2005, 17:25
I don't know much about directshow...
Now you can still tell them to install ffdshow with the vfw options enabled... (which will enable ffvfw)

esby

Sirber
23rd May 2005, 19:50
For delphi 5-7:

Medium: DSPack can do it.
Easy: aquaplaning's vidframe.dll can do it too.

http://www.progdigy.com/modules.php?name=DSPack
http://aquaplaning.20m.com/

kovi
24th May 2005, 09:32
ffDshow+avisynth frame serving. I wrote guides but people couldn't get it work.

vidfame.dll - this would be super but I often get division by 0 error with the sample program also when trying to open an avi. If I could debug it! But it doesn't let me debug.
DSPack - Huge one. How can I seek in the video easily?

And seeking is very strange in vidframe. It looks like it jumps to only to I frames in mpeg. But when I hold down th right key (or play it with the timer) it becomes smooth. I don't understand.

Sorry for my stupidness.

But thanks!

Nevermind. It almost works... Thanks to the huge progdigy forum!

Sirber
25th May 2005, 01:33
DSPack is very complete. You can build a DShow player with it. Look at the included exemples.

kovi
25th May 2005, 14:25
I can't get it work perfectly.
If I move the trackbar quickly or let it play sometimes it returns bitmap with 0 width and height.
It looks like it wants to read a new frame but the previous hasn't finished yet. I have no idea...

DarkDudae
31st May 2005, 12:09
@kovi

Are you using a DSTrackBar associated to the VideoWindowsEX ? In affirmative case, you need to update DSTrackBar Code for adding a correct DSTrackBar.Seek capabilities. (Because changing DSTrackBar.Position doesn´t works properly). You can find that update HERE (http://www.progdigy.com/modules.php?name=Forums&file=viewtopic&t=1807&highlight=dstrackbar). Anyways, opening a video with directshow won´t ensure you can open any avi file.

Greetings

kovi
4th July 2005, 15:45
Hi!

I tried to create a component to easily read video frames as tbitmap. This is my first component ever... I would like to ask someone to check for mistakes especially in the directshow part. It doesn't work always well... And I don't know why. I tried to do it from codes found on the net...
If this component were fixed, it could help a lot of people.

click here (http://lstar.uw.hu/tdavi.zip)

And the worst is that I get a message that I'm running a debugger when the program starts to use this component while I run my program from delphi and the the program exits.

Thanks!

Sirber
5th July 2005, 18:04
What input can it read?