[Libav-user] Byte based seeking

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Byte based seeking

Arthur Emídio
Hi,

What is the best approach to perform byte seeking when seek via timestamp (by using av_seek_frame()) is not available?

In my case, it is feasible to preprocess the input video by iterating through all AVFrames. I read that av_seek_frame() with AVSEEK_FLAG_BYTE doesn't always work.

I tried to use the approach described in [1] using avio_seek() but I did not succeed, I populated a (timestamp -> byte) map, such that "byte" is the byte offset of the last read key frame while preprocessing the video. The frame that I obtain after performing the seek comes way before the target, and there are lots of key frames between them.


Thank you.

--
Arthur

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user