In this article, we will learn how to use FFmpeg to convert videos to Apple ProRes 422 and 444 formats. To try this tutorial on a Windows machine, you can download an FFmpeg static build from OTTVerse’s FFmpeg build page. Instructions for FFmpeg installation for macOS and Linux can be found in our FFmpeg installation guide.
What is Apple ProRes?
Apple ProRes is a high quality, lossy video codec developed by Apple. As per Apple’s website,
Apple ProRes codecs provide an unparalleled combination of multistream, real-time editing performance, impressive image quality, and reduced storage rates. Apple ProRes codecs take full advantage of multicore processing and feature fast, reduced-resolution decoding modes.
All Apple ProRes codecs support all frame sizes (including SD, HD, 2K, 4K, and 5K) at full resolution. The data rates vary based on codec type, image content, frame size, and frame rate. Apple ProRes includes the following formats.Apple
ProRes is basically used as an intermediate compression format and is not to be used to compress videos with an intention of getting high compression efficiency. The goal of ProRes is to retain the video quality while attaining an agreeable amount of compression.
ProRes supports different resolutions and chroma sampling schemes. All ProRes422-variants use 4:2:2 10-Bit subsampling formats. Also, ProRes 4444 and 4444 XQ use the 4:4:4 chroma subsampling schema with either 10 or 12-bit depth and can optionally include an alpha channel.
A concise table from Wikipedia captures the bitrates and resolutions that the various ProRes variants can support.
Apple ProRes Profiles in FFmpeg
FFmpeg contains two ProRes encoders, the
prores-ks encoder. You can choose the encoder you want using the
profile <integer> : You can use this option to choose the ProRes profile to encode.
The FourCC codec IDs for the different Apple ProRes variants are –
- Apple ProRes 422 High Quality: ‘apch‘ (‘hcpa’ in little-endian)
- Apple ProRes 422 Standard Definition: ‘apcn‘ (‘ncpa’ in little-endian)
- Apple ProRes 422 LT: ‘apcs‘ (‘scpa’ in little-endian)
- Apple ProRes 422 Proxy: ‘apco‘ (‘ocpa’ in little-endian)
- Apple ProRes 4444: ‘ap4h’ (‘h4pa‘ in little-endian)
ProRes Encoding Options in FFmpeg
quant_mat <integer>: Select quantization matrix. If this option is set to
auto, the matrix matching the profile will be picked. If not set, the matrix providing the highest quality, default, will be picked.
How many bits to allot for coding one macroblock. Different profiles use between 200 and 2400 bits per macroblock, the maximum is 8000.
Number of macroblocks in each slice (1-8); the default value (8) should be good in almost all situations.
Override the 4-byte vendor ID. A custom vendor ID like
apl0 would claim the stream was produced by the Apple encoder.
Specify number of bits for alpha component. Possible values are 0, 8 and 16. Use 0 to disable alpha plane coding.
Encoding Apple ProRes 422 HQ using FFmpeg
The commandline for Apple ProRes 422 (HQ) encoding is pretty straightforward using the options above –
ffmpeg -i inputVideo.mp4 \ -c:v prores_ks \ -profile:v 3 \ -vendor apl0 \ -bits_per_mb 8000 \ -pix_fmt yuv422p10le \ proRes422_output.mov
If you see the commandline, we’ve used
-profile:v 3 to choose Apple ProRes 422 HQ variant using FFmpeg. If we were to change that to
2, it would be the standard ProRess 422 , and so on. You can match the profile with the table shown above to get a hang of it.
We also tell FFmpeg to use
4:2:2 10bit chroma subsampling and bit-depth.
Do remember to store the output in either of these three formats that are allowed as containers for the ProRes format.
.mxf(Material eXchange Format)
When I run this command on an
.mp4 file and then inspect the file using
ffprobe, here is what I get.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'proRes422_output.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.65.101 Duration: 00:00:10.00, start: 0.000000, bitrate: 1032846 kb/s Stream #0:0: Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, progressive), 1920x1080, 1032843 kb/s, SAR 1:1 DAR 16:9, 50 fps, 50 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler vendor_id : FFMP encoder : Lavc58.116.100 prores_ks
It shows that the chroma sampling and bit-depth is
4:2:2 10-bit. Also, FFmpeg reports that the variant is
And, here is the output of MediaInfo. It clearly shows that the “writing library” is recognized as “Apple”. And, the profile is
422 HQ and the FourCC codec ID is
apch as expected.
FFmpeg to Convert to Apple ProRes 4444 Format
ffmpeg -i inputVideo.mp4 \ -c:v prores_ks \ -profile:v 4 \ -vendor apl0 \ -bits_per_mb 8000 \ -pix_fmt yuva444p10le \ proRes444_output.mov
The commandline is same as above, but, you would change the pixel format as follows –
yuva444p10le to indicate to FFmpeg to use
4:4:4 chroma subsampling with
The output from
ffprobe is as follows –
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'proRes444_output.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.65.101 Duration: 00:00:10.00, start: 0.000000, bitrate: 1161518 kb/s Stream #0:0: Video: prores (4444) (ap4h / 0x68347061), yuv444p12le(tv, progressive), 1920x1080, 1161515 kb/s, SAR 1:1 DAR 16:9, 50 fps, 50 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler vendor_id : FFMP encoder : Lavc58.116.100 prores_ks
And from MediaInfo,
Both the outputs show that the
- Apple ProRes 4444 profile is being used
- FourCC Codec ID is
- Chroma subsampling is
- Bit Depth is
- Writing Library is
There you have it, a simple way of using FFmpeg to convert videos into Apple ProRes 422 or ProRes 4444 formats.
Krishna Rao Vijayanagar
Krishna Rao Vijayanagar, Ph.D. is the Editor-in-Chief of OTTVerse, a news portal covering technological and business news in the OTT space. With extensive experience in video compression, ABR streaming, video analytics, monetization, and more, Krishna has held multiple roles in R&D, Engineering, and Product ownership at companies such as Harmonic Inc., MediaMelon, and Airtel Digital. Krishna has published numerous articles and research papers on the latest trends in OTT and frequently speaks at industry events to share his insights and perspectives on the fundamentals and the future of OTT streaming.
6 thoughts on “FFmpeg – Convert to Apple ProRes 422 / 4444 Simplified”
Hi! Thanks for sharing this!
Hi, nice explanation. But I couldn´t do a mov with alpha (4444) in a lower bitrate. Which is the string that I need to add? Im using: \ffmpeg -r 30 -i 360CHEIO%04d.png -c:v prores_ks TESTE.MOV
but wouldn’t it be also appropiate to output in full range instead of limited?
if we care to encode to 10-bit, it makes sense to use all 1024 possible values, specially when transcoding from RGB or even XYZ
Thank you so much for this solution, it worked for me in producing a video from transparent backgroung png’s to a prores4444 video maintaining the transparent alpha channel. Really appreciate it!
That’s so nice to hear that we could help you out! All the best on your project and do share OTTVerse.com with your friends and colleagues.
Thanks so much for sharing this.
With the new Apple Silicon, it seems that FFMPEG supports hardware acceleration using videotoolbox option.
Would you be able to enlighten us on that?