Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Time seeking in H.264

bmkeller
Beginner
112 Views

What is the proper way to seek to a frame at a particular time within an MP4 file? The media playback sample provided with the libraries simply plays from beginning to end.

I have attempted to use Splitter.SetTimePosition(newTime), but always get NOT_ENOUGH_DATA errors afterwards.

0 Kudos
2 Replies
Chao_Y_Intel
Employee
112 Views

Hi,

Possibly you can post a test code and stream for investigation?

One thing that need to pay attention is that users need stop() and run() the splitter(), when use the SetTimePosition

..

SetTimePosition()

splitter->SetTimePosition(...);

splitter->Run();

Thanks,

Chao

bmkeller
Beginner
112 Views

That was the problem. I wasn't stopping prior to shifting time. Running as you indicated works fine.

Is there any way to seek to one particularly frame? The library seems structured to support the use case where a user will start at the beginning then gradually and sequentially move to the end of an MP4. This works perfectly for the case of a video playback. However, for my application, I will tend to move through the file rapidly and not necessarily in sequential order. I can make repeated calls as you indicate above, but it is inefficient for the library to compute 'n' seconds of buffer when I really only care about a single frame.

Reply