Create Custom Black and White Videos with FFmpeg

This article explains how to create custom black and white (monochrome) video profiles in FFmpeg using the powerful colorchannelmixer filter. While basic grayscale conversions discard color data uniformly, using a custom channel mixer allows you to simulate professional photographic lens filters (like red, green, or yellow filters). This guide provides the exact FFmpeg commands and mathematical formulas needed to control contrast, enhance skin tones, and darken skies for a cinematic monochrome look.

Understanding the Color Channel Mixer

To create a custom monochrome profile, you must manipulate how the red, green, and blue (RGB) channels contribute to the final grayscale image. In FFmpeg, this is achieved using the colorchannelmixer filter.

For a true monochrome output, the Red, Green, and Blue output channels must receive the exact same mixture of input channels. The basic syntax for configuring the RGB channels in the filter is:

colorchannelmixer=rr:rg:rb:0:gr:gg:gb:0:br:bg:bb

To keep the overall brightness of your video consistent, the sum of the three coefficients for each channel should equal 1.0 (e.g., 0.3 + 0.59 + 0.11 = 1.0).


Custom Black and White Profiles (Recipes)

By varying the weight of each color channel, you can mimic classic film stock and physical lens filters.

1. The Panchromatic Profile (Natural Look)

This profile mimics standard black and white film, which is sensitive to all wavelengths of visible light. It uses the standard luminous efficiency weights to create a natural, eye-pleasing grayscale. * Formula: Red (21%), Green (71%), Blue (8%) * FFmpeg Filter: colorchannelmixer=.21:.71:.08:0:.21:.71:.08:0:.21:.71:.08

2. The Red Filter Profile (Dramatic & High Contrast)

A red filter darkens blue skies and green foliage dramatically, making white clouds pop. It is perfect for high-contrast, dramatic landscapes. * Formula: Red (80%), Green (10%), Blue (10%) * FFmpeg Filter: colorchannelmixer=.8:.1:.1:0:.8:.1:.1:0:.8:.1:.1

3. The Green Filter Profile (Portraits & Foliage)

A green filter lightens foliage and darkens red tones. It is excellent for outdoor nature videography and outdoor portraits, as it diffuses skin blemishes and enhances organic green textures. * Formula: Red (10%), Green (80%), Blue (10%) * FFmpeg Filter: colorchannelmixer=.1:.8:.1:0:.1:.8:.1:0:.1:.8:.1

4. The Orthochromatic Profile (Vintage/Historic Look)

Orthochromatic film was highly sensitive to blue and green light but almost completely blind to red. This results in dark, moody skin tones and bright skies, mimicking early 20th-century cinema. * Formula: Red (0%), Green (60%), Blue (40%) * FFmpeg Filter: colorchannelmixer=0:.6:.4:0:0:.6:.4:0:0:.6:.4


How to Run the FFmpeg Command

To apply your custom monochrome profile, use the -vf (video filter) flag in your FFmpeg command. Here is an example using the Panchromatic profile:

ffmpeg -i input.mp4 -vf "colorchannelmixer=.21:.71:.08:0:.21:.71:.08:0:.21:.71:.08" -c:a copy output.mp4

Command Breakdown: