[FFmpeg-user] x264 output is hardly watchable in QT7

Elliott Balsley elliottbalsley at gmail.com
Sun Nov 24 08:30:32 CET 2013


> Which QuickTime version exactly? Is this on 10.6 Snow Leopard or higher?

I have QuickTime 7.6.6 running on OS X 10.9.

>> $ ffmpeg -i input.mov -pix_fmt yuv420p -acodec libfdk_aac -b:a 128k -vcodec libx264 -preset veryslow -crf 21 -level 41 -profile high -bf 16 -rc-lookahead 250 -tune film  output.mp4
> 
> * You should use -profile:v instead of just -profile since a same named
>  option can be used by some audio encoders. It is better to be explicit
>  instead of ambiguous.

Good idea, thanks.

> * Why do you choose -level and -profile? The defaults that the encoder
>  end up with are usually recommended unless you are restricted by
>  an old or dumb device or a stupid decoder (and in this case I'd assume
>  it would choose profile High, Level 4.0 anyway).

I want it to play on iPads, which are restricted to high profile level 4.1.

> * Why do you use -bf? This option is already covered by the preset. Why
>  16?

The veryslow preset uses 8.  I increase it to 16 for higher quality, at the cost of slower encoding.  For long videos I may do test encodes to see how many b-frames are needed, but for a short video like this I sometimes just use 16.

> * -rc-lookahead is also dealt with by the preset. Why 250?

Again, higher quality, with slower encoding.

> * libfdk_aac can use -vbr instead of -b:a if you prefer:
>  https://trac.ffmpeg.org/wiki/AACEncodingGuide

Maybe that’s better, I’ll look into it.

> According to "QuickTime-compatible Encoding" [1]:
> 
>  "A low quantizer (below 4) combined with 8x8 DCT Transforms produces
>   garbled decode results in QuickTime Player 7.7 or earlier.
>   [...]
>   Just encode all your videos with --ref 4 --qpmin 4 and be safe in
>   the knowledge that it will work for all Mac users".
> 
> As you can see in the console output "qpmin=0". So in ffmpegese use
> "-refs 4 -qmin 4" or possibly via the "-x264-params" option if you
> prefer.


Aha!  That's what I was forgetting, thank you.  By the way, I didn’t know there was a QuickTime 7.7.  I’ve never seen a software update notification about it.  Any idea what changed from 7.6?


More information about the ffmpeg-user mailing list