> ## Content Index
> Fetch the complete content index at: https://ffmpeguru.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Convert to grayscale
- URL: https://ffmpeguru.com/convert-to-grayscale/
- Published: 2026-08-21T09:00:00.000Z
- Updated: 2026-10-13T17:59:39.000Z
- Author: FFmpeguru
- Tags: ffmpeg

![](https://picsum.photos/seed/ffback15/1200/630)

Stripping the color from a video is a stylistic choice for music videos, flashbacks, or text overlays, and a technical one for archival footage or color-blind accessibility. The \`format=gray\` filter does the work in one line, but you have to chain a second format filter to keep the encoder happy.

## The command

```
ffmpeg -i in.mp4 -vf "format=gray,format=yuv420p" -c:v libx264 -crf 20 out.mp4
```

## What it does

\`format=gray\` tells FFmpeg to convert the pixel format to grayscale, dropping the chroma planes. The second \`format=yuv420p\` is needed because most encoders (including libx264) require a 4:2:0 chroma subsampled YUV frame as input. The output has the same resolution and frame rate as the input, with no color information.

## Requirements

Any video input. The filter is in libavfilter. CPU-only. The encoder does the same work as a normal encode; the file size shrinks because the chroma planes are now constant, so the encoder can compress them trivially.

## Things to avoid

- Using a single \`format=gray\` without the second format filter. The encoder will fail with 'specified pixel format is not supported' or quietly fall back to a non-standard format that some players cannot decode.
- Re-encoding the audio. If the source has a soundtrack, use \`-c:a copy\` to keep the audio untouched.
- Forgetting that the color is gone, so subtitles, watermarks, and graphics that depend on color for legibility will look different.
- Trying to recover the color later. The chroma data is dropped, not just hidden — re-encoding does not bring it back.