[Libav-user] Reliably getting the current frame number
shekh.anton at gmail.com
Fri Jan 23 18:43:11 CET 2015
2015-01-23 19:10 GMT+02:00 <coordz at megaroms.co.uk>:
> Hi all,
> I'm having some problems just doing a simple thing: getting the current
> frame number from a decoded AVFrame. ...
I spent some time researching this for virtualdub plugin.
Short answer: impossible.
Well actually if the format is good and the file is complete then there is
a full index there (not public interface).
Then you can search the index looking for matching pkt_pts from the decoded
Some other formats may work if they are continuous and have well-formed
framerate and timebase. Then you can divide either pkt_pts or pkt_dts
(which one is what anyway?)
That all is totally empiric, there is no flag in ffmpeg telling "you can
rely on that".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user