Jump to content
  • Advertisement
Sign in to follow this  

Problems seeking to avi frame with DirectShow

This topic is 4663 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on trying to extract frames from an uncompressed avi. I need to seek every frame in the avi, but instead, I get every 30th frame. I thought the process to seek generally went as follows (given an IMediaSeeking interface at pSeek and I've gotten the avi stream already)
rtNow = *frame I want to seek*

m_hr = m_pSeek->IsFormatSupported(&TIME_FORMAT_FRAME);
m_hr = m_pSeek->SetTimeFormat(&TIME_FORMAT_FRAME);
m_hr = m_pSeek->SetPositions(&rtNow, AM_SEEKING_AbsolutePositioning, 0, AM_SEEKING_NoPositioning);
if (SUCCEEDED(m_hr))
	printf("I've set frame to %d\n", rtNow);
If rtNow is set to 1, the frame I grab from the avi is actually 30, 2 is 60, etc. What is wrong with this approach?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!