[Ffmpeg-devel] av_seek_frame() units

Ian Gowen ian.gowen
Wed Jul 6 08:10:19 CEST 2005


On 7/5/05, Steve Willis <steve at stevewillis.net> wrote:
> By the way, if you are certain that all the formats you will use will be
> constant frame rate, the timestamp method can still help you:
> 
> frame_number = frame_rate * time
> 
> ...where frame_number and time are in the same units, such as seconds or ms.

Thus, time = frame_number / frame_rate. However, what I don't understand is how 
to put that into AVStream.time_base units, as the docs say to do. Do I
multiply it by
the time_base? Divide? I don't get it, and I'm pretty sure this is
where I'm screwing
up.

--Ian





More information about the ffmpeg-devel mailing list