Convert Rec. 709 to Rec. 601 with FFmpeg Colorspace

This article explains how to accurately convert video color profiles from Rec. 709 (standard for HD) to Rec. 601 (standard for SD) using FFmpeg's colorspace video filter. You will learn the exact command syntax, how to handle regional variations between NTSC and PAL, and how to write proper metadata tags so media players interpret the converted color profile correctly.

The Basic Conversion Command

The colorspace filter allows you to convert color matrix coefficients, transfer characteristics (gamma curve), and color primaries in a single operation using the shorthand all and iall options.

Because Rec. 601 has two standards—one for NTSC (525-line systems) and one for PAL (625-line systems)—you must specify which standard you are targeting.

For NTSC (SMPTE 170M / 525-line systems)

ffmpeg -i input.mp4 -vf "colorspace=all=bt601-6-525:iall=bt709" -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -c:v libx264 -c:a copy output.mp4

For PAL (BT.470BG / 625-line systems)

ffmpeg -i input.mp4 -vf "colorspace=all=bt601-6-625:iall=bt709" -color_primaries bt470bg -color_trc bt470bg -colorspace bt470bg -c:v libx264 -c:a copy output.mp4

Parameter Breakdown

  • -vf "colorspace=...": Invokes the colorspace filter.
    • iall=bt709: Defines the input video's color properties as standard Rec. 709. Overriding the input explicitly ensures the correct transformation even if the source file lacks proper metadata tags.
    • all=bt601-6-525 or all=bt601-6-625: Sets the output color properties (matrix, primaries, and transfer characteristics) to Rec. 601 NTSC or Rec. 601 PAL, respectively.
  • -color_primaries, -color_trc, and -colorspace: These output options write bitstream metadata flags into the video container. Without these flags, media players may default to rendering the video using Rec. 709 colors regardless of the actual pixel data, resulting in washed-out or oversaturated colors.
  • -c:v libx264: Re-encodes the video using the H.264 video codec. Re-encoding is required because the filter modifies the raw pixel values.
  • -c:a copy: Copies the audio stream without re-encoding to save processing time and preserve audio quality.

Explicit Parameter Configuration

If you prefer to define each component individually rather than using the all shorthand, use the explicit parameter syntax:

ffmpeg -i input.mp4 -vf "colorspace=space=smpte170m:primaries=smpte170m:trc=smpte170m:ispace=bt709:iprimaries=bt709:itrc=bt709" -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -c:v libx264 -c:a copy output.mp4

In this syntax:

  • space and ispace define the matrix coefficients.
  • primaries and iprimaries define the chromaticity coordinates of the primary colors.
  • trc and itrc define the transfer characteristics.