[Ffmpeg-devel] Timestamp, av_seek_frame... troubles

tenze at libero.it tenze
Mon Mar 26 14:28:58 CEST 2007

Hi all,

I am trying to use the av_seek_frame function to reach a given position in a stream (I am currently working on a mpeg2 stream) but I am not able to correclty manage the timestamp argument.

Which is the unit of timestamp? The documentation says AV_TIME_BASE... but according to this definition I cannot find the right position into the stream:

timestamp= frame_number* (AV_TIME_BASE/framerate)
It does not work.

Moreover, I do not understand how to manage the initial offset: when the first frame of the stream has a timestamp different from 0.

How is the index_entries field of AVStream related to the timestamp?

If I want to read a given frame N, what I have to do?

Many thanks in advance!

Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom

More information about the ffmpeg-devel mailing list