[Ffmpeg-devel] Newbie - How to go to the near frame to specify timestamp?

qqq qqqq apuntesus
Wed Feb 1 21:46:39 CET 2006


Hi ,

I find that there is no way to know frame count ... or
jump to a determinate frame.

I am newbie , i do some test with avcodec and
avformat.

Now i can open file , and get one frame picture (the
first frame in the file) and save this picture into
file.

I want to jump to a determinate timestamp and get the
near frame for this timestamp.

I find the function av_seek_frame.

I try to use this function this way :

av_seek_frame(FormatContext , videostream , timestamp
, AVSEEK_FLAG_BACKWARD)

But i don't know how to set timestamp , i send to this
function the timestamp in seconds but i don't get the
result i want. (example if send timestamp 60 and
timestamp 420 i get the same picture).

I try to send timestamp this way :
timestamp = 60 * AV_TIME_BASE;

But i get the same result (same picture) if i send :
timestamp = 60 * AV_TIME_BASE;
timestamp = 420 * AV_TIME_BASE;

Any sample code to use av_seek_frame ?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





More information about the ffmpeg-devel mailing list