Saving a sill picture of a video file

Hi!

I'd like to write a program writing several still pictures of a video file as jpeg to the hard drive. I tried the MediaDetClass and it works, but not for DivX. I'm able to play a video file using the audiovideoplayback from DirectX. Shouldn't it be possible to save the stopped video picture to disk somehow?

thx
michael

[335 byte] By [sub.0ne] at [2007-12-25]
# 1
I've moved this thread to the DirectX forum.
CharlieCalvertMSFT at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 2
As long as you have the filters necessary to decode DivX videos, which you obviously do, MediaDet should work. Can you elaborate on how it doesn't work? Does it fail with a certain error, or does it produce black images, or what?
MuhammadHaggag at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 3
The picturebox shows just a green screen. Trying to play them using the audiovideoplayback works fine. I was not able to reproduce this within any media player yet. May it be a problem with my qedit.dll? I use Nero drivers for divx playback, because they have a better quality and are a lot faster.
sub.0ne at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 4
The problem most probably lies in your image retrieval code--the code that calls MediaDet and converts the buffer it gives you into a bitmap. MediaDet is really a simple wrapper that creates a normal sample grabber filter graph with a null renderer, so there should be nothing wrong with it. Can you post the saving code?
MuhammadHaggag at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 5
MediaDetClass md = new MediaDetClass();
md.Filename = videoFile;
md.CurrentStream = 0;
md.WriteBitmapBits(40, 320, 240, "f:\\test.bmp");

sub.0ne at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 6
[moving to DirectShow forum[
TheZMan at 2007-9-3 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...

Software Development for Windows Vista

Site Classified