<div dir="ltr"><div>Hi,</div><div><br></div><div>What is the best approach to perform byte seeking when seek via timestamp (by using av_seek_frame()) is not available?</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>[1]: <a href="https://stackoverflow.com/a/3062994/351527">https://stackoverflow.com/a/3062994/351527</a></div><div><br></div><div>Thank you.</div><div><br></div><div>--</div><div>Arthur</div></div>