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

  • Next message: Jeremy Noring: "Re: Unable to create VMR9"
    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? 
    

  • Next message: Jeremy Noring: "Re: Unable to create VMR9"

    Relevant Pages

    • Re: Movie Rendering in Direct3D
      ... still, read up on filters, and managing filter graphs. ... >> InitGeometry, and Render. ... >> gets a pointer to the base filter from the texture renderer filter, ... >> adds the source filter to the graph ...
      (microsoft.public.win32.programmer.directx.graphics)
    • Re: Help with DirectShow error - IAMStreamConfig & IGraphBuilder::ConnectDirect
      ... I'm using a commercial video editing application, Pinnacle Studio 8, and am having a problem that on one machine the application will not render _any_ clips - not the sample demo supplied, not my video, not video captured by the application itself. ... Studio8 will always create a log, and I'm posting a small part of the log that always occurs when I attempt to render. ... I have seen issues where some third-party packages install common filter types with a higher merit value than the default types - resulting in these filters always being selected. ... For instance I was doing some testing yesterday with the Elecard MPEG-2 encoder package. ...
      (microsoft.public.win32.programmer.directx.video)
    • Re: Controlling DataFlow upstream of a Smart Tee.
      ... > Source Filter instead of Device Capture Filter). ... The graph I made works ... If you take the file and render it in GraphEdit, ... clock) but an async file reader. ...
      (microsoft.public.win32.programmer.directx.video)
    • Re: Problem: color space conversion by DirectShow
      ... > After that I call series of filters that requiere YUY2 ... AviSynth clearly does not build the same graph otherwise it ... any filter that can extract data from the graph?). ... the video renderer, which won't be the case in AviSynth, the ...
      (microsoft.public.win32.programmer.directx.video)
    • AddSourceFilterForMoniker() locks up sometimes.
      ... I've coded a simple filter graph to capture frames from a video camera ... I can grab frames from the Sample Grabber with no ...
      (microsoft.public.win32.programmer.directx.video)