[Ffmpeg-devel] syncing to packet boundaries

Jan Bölsche jan
Tue Apr 11 12:10:05 CEST 2006

Hi, I have an API level question:

Is there a way to find the nearest packet header for a given byte 
position in an audio or video stream
and seek to that position, so that av_read_packet(pFormatCtx, &packet) 
would read that packet?

I was browsing doxygen documentation and didnt find such functionality.

Or could I simply use url_fseek (if it was opend as a url) on the 
AVFormatContext's ByteContect to seek to an arbitrary position and then 
rely on av_read_packet() to sync with packet header?

Is there a solution that is independant of a specific format/codec?

How would you implement this?


More information about the ffmpeg-devel mailing list