Verify and Convert Video to 10-Bit yuv420p10le with FFmpeg

Working with high-quality video often requires verifying the current color depth and converting files to a highly compatible 10-bit format. This guide provides a straightforward tutorial on how to check a video’s existing pixel format using FFprobe and how to convert it to the widely supported yuv420p10le (10-bit YUV 4:2:0) format using FFmpeg.


Step 1: Verify the Current Pixel Format

Before converting, you should check the existing pixel format of your video file. You can do this quickly using FFprobe, which is packaged alongside FFmpeg.

Run the following command in your terminal:

ffprobe -v error -select_streams v:0 -show_entries stream=pix_fmt -of default=noprint_wrappers=1:nokey=1 input.mp4

Alternatively, you can view the complete stream details by running:

ffmpeg -i input.mp4

Look for the line starting with Stream #0:0 (Video). Inside the parentheses, you will see the pixel format listed (e.g., yuv420p or yuv422p).


Step 2: Convert the Video to yuv420p10le (10-bit)

Once you have verified the format, you can transcode the video to the 10-bit yuv420p10le pixel format.

Depending on your target codec, use one of the following commands:

HEVC has excellent native support for 10-bit color.

ffmpeg -i input.mp4 -c:v libx265 -pix_fmt yuv420p10le -c:a copy output.mp4

Option B: Using H.264 / AVC (High 10 Profile)

Note that while H.264 supports 10-bit (High 10 profile), some older hardware players may struggle to decode 10-bit H.264 videos.

ffmpeg -i input.mp4 -c:v libx264 -pix_fmt yuv420p10le -c:a copy output.mp4

Explanation of the Parameters: