[FFmpeg-user] ProRes Quicktimes with audio not playing back reliably

Bob Maple bobm-ffmpeg at burner.com
Wed Oct 24 06:42:47 CEST 2012


On 10/23/2012 5:12 PM, Bob Maple wrote:

> With my manufactured sources, I've managed to make some 30 second test
> files from ffmpeg that are either all aligned, all unaligned but even
> packet sizes (except the first), or a mixture.. and I'm not getting
> conclusive results on any of them, either way.

OK I'm making a bit more progress.  None of my contrived test files 
seemed to be failing, yet I have some clips shot on DSLR that when 
re-encoded fail almost immediately.  So it dawned on me,  I believe my 
graphic tests just weren't complex enough.. the frames themselves were 
compressing down fairly small, so the raw data-to-time ratio was 
relatively low.

So I pulled in a still with lots of detail in it (branches, leaves, 
rocks) and managed to get two different versions made through ffmpeg, 
one with all the packet sizes even in length, and all aligned.

It plays back miserably!

I re-saved this from Quicktime Pro (basically letting it re-mux, no 
recompression of video or audio) and... the result seems to playback 
perfectly fine.

While all of the packets in this remux are even-sized, the entire thing 
is out of alignment file position wise, apparently due to something in 
the header winding up odd sized.. but no matter, it seems to play.  The 
primary difference is that the muxing rate is much longer than what 
ffmpeg generates.  For instance, ffmpeg makes:

VaaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaaVaVaaVaVaaVaVaaVaVaaVaaVaVaaVa

etc. while the Quicktime Pro remux (and other "real" ProRes files) look 
more like:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaVVVVVVVVVVVVVVVaaaaaaaaaaaaaaaaaaaaaaaaVVVVVVVVVVVVVVVaaaaaaaaaaaaaaaaaaaaaaaaVVVVVVVVVVVVVVVaaaaaaaaaaaaaaaaaaaaaaaaVVVVVVVVVVVVVVV

At this point I'm feeling confident that it's a general performance 
issue with the very tight mux ffmpeg is doing, AND almost certainly 
exacerbated by the odd frame lengths in most situations which helps 
explain why the behavior is so erratic.

So my next question, is there any way to tell ffmpeg to mux/re-mux with 
larger runs, to see if this greatly improves the reliability of 
playback, or is this hard-coded into the muxer (in which case, is there 
somewhere obvious I can hack it to build my own and test?)

Ultimately it would be nice to get the ProRes encoders to generate 
even-length frames as well since Apple's encoder seem to do this, but 
the longer muxing is probably enough to mask the lousy Quicktime code 
and allow me to actually send these files to clients without worrying so 
much.

I can also post my source movies or the ffmpeg encoded ones if anyone 
wants them to play with; since they are a single repeated frame, 7Zip 
compresses the shat out of them (~1.1GB down to ~3.5MB :)

Will still try to get on the Mac tomorrow to feed these to FCP and 
hopefully narrow down exactly what property (packet length, alignment, 
or mux rate) causes it to throw the optimization warnings.

Bob



More information about the ffmpeg-user mailing list