[FFmpeg-devel] [PATCH 1/2] avformat/avformat: Introduced `AVInputFormat.read_timestamp2` to fix keyframe seeking for formats that rely on `read_timestamp` for seeking

Michael Niedermayer michael at niedermayer.cc
Mon Sep 9 01:32:49 EEST 2019


On Sat, Sep 07, 2019 at 03:52:01PM -0700, Darren Mo wrote:
> I think I understand some of what you are saying. You are saying that after the bisection, continuously step backwards + read forward while doubling the step size until the keyframe is found?

yes


> 
> Some questions:
> - What is the difference between the lowercase k and the uppercase K in your diagram? 

the K is the keyframe with largest timestamp before our target
k is another keyframe which we encounter in the example, i added that
to show that we cannot stop when finding a keyframe


> And to make sure I didn’t misunderstand, v is the result of the bisection and A/B/C indicate the steps?

yes

> - Why after finding the keyframe in step C, is there an extra -->?

because we do not know if there are more keyframes in that area before
looking and if there are they would be closer to our target timestamp


> - Re: “there is code somewhere in git to do something similar already”, do you have an idea of what I should search for to find this code?

ff_find_last_ts()

thanks


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190909/de31c9ca/attachment.sig>


More information about the ffmpeg-devel mailing list