[FFmpeg-devel] RFC qt-faststart Implemented in Python

Måns Rullgård mans
Sun Sep 7 18:28:41 CEST 2008


"Daniel G. Taylor" <dan at programmer-art.org> writes:

> Hello,
>
> I have recently reimplemented qt-faststart.c in Python. It is attached
> to this message. It is nearly as fast as the C version and has some
> useful features:
>
>  * No compilation needed

Actually, it's being compiled every time it's run.

>  * Works everywhere Python can be installed

Places where python can be installed are a (small) subset of places
where C programs can run.

>  * Handles both 32-bit (stco) and 64-bit (co64) atoms (regardless of 
>    whether the underlying system is 32/64-bit, big/little endian, etc)
>  * Handles any file where the mdat atom is before the moov atom, and
>    preserves the order of atoms in the file after moving the moov atom.

Are these things that the C version can't do?  If it can't how hard
would it be fix that?

>  * Can replace the original file if given no output filename

Does it do this using a temporary file or by in-place shuffling of
data?

> Since others may find this useful I'm posting it here and asking if
>it can be included in the tools directory like qt-faststart.c is.

Whenever someone proposes a rewrite of an existing tool in languages
like Python, one should first ask, what is it good for?  In this case,
I see mainly an added dependency on a bloated interpreter and a
tenfold increase in runtime, for no apparent improvements at all.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list