Split Video into Separate Y U V Planes Using FFmpeg

Extracting the individual Y (luminance), U (chrominance blue), and V (chrominance red) components of a video is a common task in video analysis, compression research, and visual effects. This guide demonstrates how to use the powerful extractplanes filter in FFmpeg to isolate these three color channels and save them simultaneously into three independent, grayscale video files.

The FFmpeg Command

To extract and save the Y, U, and V planes in a single command pass, use the following FFmpeg syntax:

ffmpeg -i input.mp4 -filter_complex "extractplanes=y+u+v[y][u][v]" \
-map "[y]" y_plane.mp4 \
-map "[u]" u_plane.mp4 \
-map "[v]" v_plane.mp4

How the Command Works

Because individual color channels do not contain RGB color data on their own, the resulting output videos for the U and V planes will appear as grayscale videos representing the intensity of those specific color channels.

Choosing the Right Codec (Optional)

By default, FFmpeg will auto-select a codec based on your output container (like H.264 for .mp4). If you require lossless quality to preserve the exact raw pixel data of each plane for scientific or editing purposes, you can encode them using the ffv1 or x264 lossless encoder:

ffmpeg -i input.mp4 -filter_complex "extractplanes=y+u+v[y][u][v]" \
-map "[y]" -c:v libx264 -crf 0 y_plane.mp4 \
-map "[u]" -c:v libx264 -crf 0 u_plane.mp4 \
-map "[v]" -c:v libx264 -crf 0 v_plane.mp4