Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Advice on fast seeking/scrubbing/jumping to frames with H264

Diederick_H_
Beginner
521 Views

Hi,

I'm using the Intel Media SDK for decoding a h264 stream and I'm very happy with the results. Decoding 4K at 900fps! I'm now looking for a way that allows me to perform jumping between frames in real-time. Lets say the current frame is 25 and I want to jump to frame 100, then I would first need to find the nearest I-frame. When the nearest I-frame is 90, I need to decode from frame 90 to 100. This may take too much time and therefore one solution would be to only store I-frames which ofcourse will increase the file size.

Lets say I have plenty of cpu, ram, etc.. what would be the best solution that allows me to jump between frames in real-time? 

If I'm correct I need to reset the decoder, but would this slow down decoding?

Thanks

 

0 Kudos
3 Replies
Sravanthi_K_Intel
521 Views

Hi Diederick,

To seek/skip frames in decoder, the two options that exist today are (1) Use the fast HW decoder to decode frames and discard the ones not needed. Given the very high decoding fps, this option may not hurt your pipeline as much. (2) Do the pre-processing on the CPU side to parse the frames and identify them.

Hope this helps.

0 Kudos
Diederick_H_
Beginner
521 Views

Hi Sravanthi,

I'm using a combination. I'm parsing the h264 stream and identify the start offsets (in bytes) of the frames and store these offsets in a file. Then when I want to playback from a specific frame, I look for the closest idr-frame, read the sps and pps (I think this is wrongly mentioned in the manual), and start decoding up to the frame. This works perfectly and is easy doable in real time for 4K.

Thanks

D

0 Kudos
Sravanthi_K_Intel
521 Views

Glad to know you have a good working solution Diederick. I am guessing your solution also meets your performance requirements. Happy coding!

0 Kudos
Reply