Set ProRes Color Space and Field Dominance in FFmpeg
This article provides a straightforward guide on how to configure color space and field dominance metadata in Apple ProRes MOV files using FFmpeg. You will learn how to set these parameters both during the video encoding process and when modifying metadata on an existing ProRes file without re-encoding.
Method 1: Setting Metadata During Encoding
When transcoding a video to ProRes, you can inject the correct color space and field dominance metadata directly into the output file by using FFmpeg’s video tag and flag options.
Run the following command to encode a video to ProRes with HD color space (Rec. 709) and Top Field First (TFF) interlacing:
ffmpeg -i input.mp4 -c:v prores -profile:v 3 -pix_fmt yuv422p10le -colorspace bt709 -color_primaries bt709 -color_trc bt709 -field_order tt output.movParameter Breakdown: * -c:v prores:
Specifies the standard Apple ProRes encoder. *
-profile:v 3: Sets the ProRes profile to ProRes HQ (use
0 for Proxy, 1 for LT, 2 for
Standard, 3 for HQ). * -colorspace bt709: Sets
the color matrix coefficients to Rec. 709. *
-color_primaries bt709: Sets the color primaries to Rec.
709. * -color_trc bt709: Sets the transfer characteristics
to Rec. 709. * -field_order tt: Sets the field dominance to
Top Field First (use bb for Bottom Field First, or
progressive for progressive scan).
Method 2: Modifying Metadata Without Re-encoding
If you already have a ProRes MOV file and want to change the color
space or field dominance without wasting time and quality on a
re-encode, you can use FFmpeg’s prores_metadata bitstream
filter.
Run the following command to update the metadata on an existing file:
ffmpeg -i input.mov -c:v copy -bsf:v prores_metadata=color_primaries=bt709:transfer_characteristics=bt709:matrix_coefficients=bt709:interlaced=1 output.movParameter Breakdown: * -c:v copy:
Copies the video stream without re-encoding, preserving the original
quality. * -bsf:v prores_metadata: Calls the ProRes
metadata bitstream filter. * color_primaries=bt709:
Modifies the color primaries. *
transfer_characteristics=bt709: Modifies the transfer
curves. * matrix_coefficients=bt709: Modifies the color
matrix. * interlaced=1: Sets the field dominance. Use
0 for progressive, 1 for Top Field First
(TFF), and 2 for Bottom Field First (BFF).