Convert yuv420p10le to yuv420p with FFmpeg

This article provides a quick, step-by-step guide on how to convert a video’s pixel format from 10-bit (yuv420p10le) to standard 8-bit (yuv420p) using FFmpeg. Converting to yuv420p is a common solution for resolving playback compatibility issues on older devices, web browsers, and media players that do not support high-bitrate 10-bit color spaces.

The Basic Conversion Command

To change the pixel format of a video, you need to use the -pix_fmt flag in FFmpeg. Run the following command in your terminal:

ffmpeg -i input.mp4 -pix_fmt yuv420p output.mp4

Command Breakdown

Because changing the pixel format requires re-encoding the video, it is best to specify a video codec and a quality target (using Constant Rate Factor, or CRF) to ensure your output video looks sharp and does not have unnecessarily large file sizes.

Use this command for standard H.264 video encoding:

ffmpeg -i input.mp4 -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a copy output.mp4