[FFmpeg-devel] [PATCH] Reduce exessive seeking in mov demuxer

Baptiste Coudurier baptiste.coudurier
Fri Oct 5 22:47:55 CEST 2007

Hi Michael,

Michael Niedermayer wrote:
> Hi
> On Fri, Oct 05, 2007 at 09:46:28PM +0200, elupus wrote:
>>This patch reduces the exessive seeking back and forth using the mov 
>>demuxer. Current code selects the next packet to read based on lowest dts 
>>of all possible streams. For some reason alot of mov files are muxed in 
>>such a way that that isn't always the order in wich they come in the 
>>stream. This patch changes the selection to be based on the position in the 
>>stream instead.
>>Now if you know the filesystem has fast seeking, this might not be the best 
>>way. But I think it is better to have as default.
> the (obvious?) problem is that your patch will totally break files which
> arent approximately correctly interleaved
> (yeah 2 hours of video before the first audio packet doesnt work, or to say
> it differently you will run out of memory to buffer a few gb of video)
> still a mov file doing that is perfectly valid ...

Yes, I totally agree.
Im still thinking about a nice way to handle piped or streamed files
where it might be better to read by position.
Demuxing that way for url_is_streamed files might be ok.

What do you think about that ?

Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312

More information about the ffmpeg-devel mailing list