locked
Saving a frame from a video stream RRS feed

  • Question

  • I process the frames of the video files using sample grabber. After i process all the frames, according to processing results i need to save some frames to a folder. However, i do not know which frame will be saved during the frame by frame processing. On the other hand after processing all frames i do not want to run the graph again and save the determined frames to a .jpg file within the callback function.

     

    Is there a way to save the specific frames without going through all the frames from the beginning?

     

    Thanks.

     

    Emrah

    Sunday, August 19, 2007 9:00 PM

Answers

  • Depending on your frame processing, you can run the graph again - this time use the IFrameStep interface to step to the desired frame(s).

    Or alternatively if this doesn't work, you can try IMediaSeeking:Tongue TiedetPositions to step to the right frame. In this case, you would have to initialize IMediaSeeking with:

    IMediaSeeking->SetTimeFormat( &TIME_FORMAT_FRAME ) .

    You might have to experiment which one works for you.

    Monday, August 20, 2007 3:34 AM