ffmpeg

How can I set a Clean Aperture on a QuickTime file in ffmpeg?


I am using ffmpeg to convert files to QuickTime containers. I understand that certain QuickTime files requires clap atoms, ie "This is a mandatory extension for all uncompressed Y´CbCr data formats."

https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-125850

Is there a way to specify a clap atom when using ffmpeg to output a QuickTime file? Otherwise would there be harm in adding a clap atom at the end of the file assuming that I updated any file length field? Lastly, assuming that there is not doubt as to the proper viewable/usable pixel dimensions of my file, is a clap even necessary?


Solution

  • FFmpeg will write a clap atom if and only if the video codec is one of the following:

    1. rawvideo pix_fmt uyvy422
    2. rawvideo pix_fmt yuyv422
    3. v308 (uncompressed packed 8-bit YUV 444)
    4. v408 (uncompressed packed 8-bit YUV 4444)
    5. v410 (uncompressed packed 10-bit YUV 444)
    6. v210 (uncompressed packed 8 or 10-bit YUV 422)

    So, if the codec qualifies, ffmpeg will automatically write it.