[FFmpeg-devel] [qt-faststart] Ever get "could not allocate 0x14 byte for ftyp atom"?

Gilles Dubuc kouiskas
Fri Mar 14 16:24:16 CET 2008


Mike Melanson <mike <at> multimedia.cx> writes:

> 
> matthieu castet wrote:
> > May the file has a lot's FTYP atoms.
> > The code does malloc without checking if ftyp_atom!=NULL in a loop.
> > This can lead to a great memory DOS for broken files...
> 
> Interesting theory. Per my understanding, a file should have, at most,
> one FTYP that's at the beginning. But I guess there is nothing to stop a
> muxer from adding more.
> 

I've made a sample video file (which encoutners the same bug as the previous
posters) available there:
http://videoupload.darumazone.com/outbox/1205436652Aluminum7.mov (240 KB)

This is the command I've used to encode it with ffmpeg (version taken from the
SVN today):

First pass:

/usr/local/bin/ffmpeg -y -i $inputfile -threads 2 -pass 1 -an -vcodec libx264 -b
200000 -r 25 -s 400x300 -bf 3 -qcomp 0.7 -g 250 -refs 5 -loop 1 -flags +4mv -cmp
256 -coder 0 -me_range 16 -sc_threshold 40 -i_qfactor 0.71 -level 30 -qmin 10
-qmax 51 -qdiff 4 -subq 1 -me hex -partitions 0 -trellis 0 -flags2 +mixed_refs
$outputfile 

Second pass:

/usr/local/bin/ffmpeg -y -i $inputfile -threads 2 -pass 2 -acodec libfaac -ar
22050 -ab 32000 -ac 2 -vcodec libx264 -b 200000 -r 25 -s 400x300 -bf 3 -qcomp
0.7 -g 250 -refs 5 -loop 1 -flags +4mv -cmp 256 -coder 0 -me_range 16
-sc_threshold 40 -i_qfactor 0.71 -level 30 -qmin 10 -qmax 51 -qdiff 4 -subq 6
-me umh -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags2
+wpred+mixed_refs+brdo+8x8dct -trellis 1 $outputfile

I hope that helps. In the meantime, should I download an older version of ffmpeg
and/or qt-faststart to be able to have my H.264 encoding going with proper fast
start streaming?

Thanks,
G





More information about the ffmpeg-devel mailing list