[FFmpeg-devel] Any suggestion about better handling edit list in mov demuxer.

Thierry Foucu tfoucu
Wed May 12 05:35:12 CEST 2010


Me and my co-worker were talking about adding more support for edit list in
the mov demuxer.
Before we start to implement some of it, we were wondering if any of you
have some idea how to do it.

There are some simple cases where there is only 1 edit list and we just need
to sync the audio/video and more complex with multiple edit list, etc. And
we would like to handle as many cases we can.

because the first frame of an edit list does not have to be a key frame, it
seems the edit list need to be link with a decoder, as we may have to pass
extra frame to the decoder to be able to decode the first frame of the edit
Same problem with the audio when the edit list is inside one sample (we
could always ignore this as it will add a little bit of lipsync)

So, we were thinking of:

   - Adding a flag to AVPacket like DROP_AFTER_DECODER, in which case the
   demuxer could mark which packet will be needed to be dropped after decoding,
   and  av_read_frame will still return them to pass them to the decoder.
   - or, maybe adding the start_time to a avcontext (or some other
   structure) and have the demuxer set the start_time after each edit list and
   in ffmpeg.c, instead (or mayb "and") of looking at the variable start_time
   and compare it to the pts, ( which is for now the same start_time for audio
   and video), we could maybe check the start_tme for each stream to see if we
   need to pass the decoded frame or not.
   - Take the not submitted patch from  krishna, which was send to the
   mailing list in 02/18/2009 (subject: Patch to add support for handling
   multiple edit lists in MOV files), to either rewrite the GPL code to be LGPL
   and fix all Baptiste comments.
   - Or finish the SoC of last year? to add support playlist and convert an
   edit list to a play list?
   - ...

Any other suggestion?



More information about the ffmpeg-devel mailing list