How to get the snapshot of the first video frame of MPEG-2 video?

From: kimi (kimi_at_intervideo.com.cn)
Date: 11/09/04


Date: Tue, 9 Nov 2004 12:45:42 +0800

I use the DirectShow to build a filter graph which can render the many video
types. I wanna to capture the first frame of the video to display it in the
app window.The way I try list following:
1. run the graph, and pause it, get the Video Render Filter and call the
GetCurrentImage method.
2. pause the graph directly(don't play it first), call GetCurrentImage.
3. step the graph 1 frame, and call getcurrentImage.
all ways can be work well when I render the MPEG-1, AVI, WMV, and so on, the
only one they cannot work well on is MPEG-2 video. When I use the any way of
above to get the frame, the method return S_OK, but the Image is black
screen!(I am sure it should not be a black screen)

Do you have any good way to get the Image? I have tried the IMediaDet, it's
still cannot solve the problem.



Relevant Pages

  • Re: Qt and DirectShow (Not Quicktime)
    ... at it's frame before clicking so the video will stay on the current frame. ... When I choose to paint the QPixmap on top of the video, ... Does the bitmap show up after the graph is run again? ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How to get the snapshot of the first video frame of MPEG-2 video?
    ... >I use the DirectShow to build a filter graph which can render the many ... run the graph, and pause it, get the Video Render Filter and call the ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Why filter graph display the previous frame...........
    ... Pausing the filter graph cues the graph for immediate rendering when ... filters process data ... do not render the data. ... poster frame of the first sample. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: IVideoframeStep
    ... > To point this, I'm trying to step frame to frame in the video, but ... > Which is the fastest way to start and stop the graph whenever I want? ... Iain Downs ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Direct3d Front Buffer Capture
    ... The video event RenderToTexture() is just a trigger that starts throwing the ... Once you're done with it, you can use device.SetTexture(stage, texture) to ... In the panel1 paint event, i have a render method, in which i draw the video ... If you want just grab a frame, ...
    (microsoft.public.win32.programmer.directx.managed)