Re: How to get the snapshot of the first video frame of MPEG-2 video?
From: Jeremy Noring (somewhere_at_thenet.com)
Date: 11/09/04
- Previous message: Jeremy Noring: "Problem with VMR9::GetCurrentImage"
- In reply to: kimi: "How to get the snapshot of the first video frame of MPEG-2 video?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 9 Nov 2004 14:26:05 -0700
"kimi" <kimi@intervideo.com.cn> wrote in message
news:OXxm3YhxEHA.1260@TK2MSFTNGP12.phx.gbl...
>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.
Doing this, and doing it well, is actually somewhat of a pain. You might
look at the IMediaControl::StopWhenReady() method, but I've only had
marginal success using that method and consistently getting a first frame.
Writing a custom source filter has been more successful, but the obvious
problem there is that it's typically media-specific.
-- Where am I going? And why am I in this handbasket?
- Previous message: Jeremy Noring: "Problem with VMR9::GetCurrentImage"
- In reply to: kimi: "How to get the snapshot of the first video frame of MPEG-2 video?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|