[FFmpeg-devel] [RFC] Seeking API

Michael Niedermayer michaelni
Thu Jan 22 22:53:16 CET 2009

On Thu, Jan 22, 2009 at 12:46:42PM -0800, Baptiste Coudurier wrote:
> Hi Michael,
> Michael Niedermayer wrote:
> > Hi
> > 
> > Do we need a new API for seeking?
> > I think we do
> > 
> > * currently seeking happens based on >=X or <=X this is not truely ideal
> >   for a normal player, for example at position 100sec and seeking 10sec
> >   forward we would prefer 109 over 200sec likely but not 99sec over 200sec
> > * seeking in relation to a single specific stream makes little sense, rather
> >   seeking should happen relative to the set of streams that is presented
> >   to the user (= the ones not disabled by AVStream.discard)
> > 
> > Are there other issues? requirements?

> Yes, I'd like a new AVSEEK_FLAG_FRAMENUM for containers supporting it
> (mov/mp4/r3d)

This also needs a stream_index  and could be done by the user app with
ts= st.index_entries[frame_num].timestamp;

> Not sure if this is much related to seeking:
> I'd like containers to export the AVIndex feature usage and add pts to
> AVIndexEntry, also a way to generate the full AVIndexEntry and have the
> possibility to export it as file to be loaded later.

> Also user needs to specify if he wants to seek by dts or pts and
> therefore what timestamp value refers to.

Is there any use case in which the user wants to seek by dts?

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090122/d23991c7/attachment.pgp>

More information about the ffmpeg-devel mailing list