2

QuickTime can create a movie from a sequence of input images. Different formats for the output can be selected, including HEVC and Apple Pro Res. Unfortunately, QuickTime allows for no control over the compression rate. The file using the HEVC codec is too noisy for my taste and the file using Apple Pro Res is huge. Alternatively a file can be produced using ffmpeg, like so

ffmpeg -framerate 60 -i %d.png -c:v libx265 -pix_fmt yuv420p -x265-params lossless=1 -vf scale=out_color_matrix=bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 out.mov

Unfortunately, the resulting file is not compatible with QuickTime. This is quite surprising, as the metadata for the file produced in QuickTime and the file obtained from ffmpeg seem to be quite similar. Here's the metadata for the QuickTime file

Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2021-01-06T16:42:09.000000Z
  Duration: 00:00:03.02, start: 0.000000, bitrate: 1927 kb/s
    Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709, progressive), 1280x960 [SAR 1:1 DAR 4:3], 1918 kb/s, 60 fps, 60 tbr, 600 tbn, 600 tbc (default)
    Metadata:
      creation_time   : 2021-01-06T16:42:09.000000Z
      handler_name    : Core Media Video
      encoder         : HEVC

and here's the metadata for the ffmpeg file

Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.45.100
  Duration: 00:00:03.02, start: 0.000000, bitrate: 8003 kb/s
    Stream #0:0: Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 1280x960 [SAR 1:1 DAR 4:3], 7990 kb/s, 60 fps, 60 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.91.100 libx265

Does anyone know how to produce a QuickTime compatible file using ffmpeg or some other freely available software?

2
  • Quicktime never was the most codec-rich player. Back in the day it needed Perian to do a lot of what other players would do as standard. Perian is long gone now ;\
    – Tetsujin
    Commented Jan 6, 2021 at 17:33
  • It looks like this is not possible with ffmpeg.
    – 220284
    Commented Jan 11, 2021 at 20:37

1 Answer 1

2

If you tag your video

-tag:v hvc1

Your ffmpeg command works for me:

ffmpeg -framerate 60 -i %d.png -c:v libx265 -pix_fmt yuv420p -x265-params lossless=1 -vf scale=out_color_matrix=bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -tag:v hvc1 out.mov

I am using ffmpeg available from Conda-Forge at version; ffmpeg version 6.1.1

Edit: Looks like this does not preserve alpha transparency. In order to do so, I had to add/modify your list of arguments:

ffmpeg -framerate 60 \
 -i %d.png \
 -c:v hevc_videotoolbox \
 -pix_fmt bgra \
 -x265-params \
 lossless=1 \
 -vf scale=out_color_matrix=bt709 \
 -color_primaries bt709 \
 -color_trc bt709 \
 -colorspace bt709 \
 -alpha_quality 0.9 \
 -tag:v hvc1 out.mov

hope this helps others!

You must log in to answer this question.

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