• 12
• 12
• 9
• 10
• 13

# Problems seeking to avi frame with DirectShow

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

## 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?