2

I'm experimenting with video compression using ffmpeg (version 4.2.2), and used this command:

ffmpeg -i old.mp4 -c:v libx264 -crf 0 -preset fast newCrf0.mp4

but the resulting video would not play on QuickTime Version 10.5, on MacOS 10.14. The rather unhelpful error message was : "The file isn’t compatible with QuickTime Player."

After failing to find an explanation, I tried this:

ffmpeg -i old.mp4 -c:v libx264 -crf 10 -preset fast newCrf10.mp4

and QuickTime played it. I am very curious to find out what's going on.

Here are the summaries from ffprobe for each file:

$ ffprobe -hide_banner newCrf0.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'newCrf0.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:02:34.54, start: 0.000000, bitrate: 4114 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p, 1280x720, 3979 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


$ ffprobe -hide_banner newCrf10.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'newCrf10.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:02:34.54, start: 0.000000, bitrate: 1146 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1010 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

Clearly, there's a difference in the video streams: h264 (High 4:4:4 Predictive) vs h264 (High).

  • What does that mean?
  • Is that the root of the problem?
  • Is CRF=0 problematic with other players?

Ref: FFmpeg H.264 video encoding guide

1 Answer 1

2

QuickTime only supports H.264 with YUV 4:2:0 chroma subsampling, but using -crf 0 results in 4:4:4.

Any FFmpeg based player such as VLC or mpv will support these files.

1
  • 1
    Thank you @llogan. That's interesting. The ffprobe output for the file generated using -crf 0 includes yuv420p. Im assuming that doesn't contradict it also saying h264 (High 4:4:4 Predictive). But why not? I'm new to this and keen to understand what's going on. Commented May 11, 2020 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .