Guides › FFmpeg

FFmpeg pixel format not supported: the -pix_fmt yuv420p fix

Fix FFmpeg "Specified pixel format is invalid or not supported", NVENC 4:4:4 errors and videos that will not play in browsers with -pix_fmt yuv420p.

What it looks like in your log

Incompatible pixel format 'yuv444p' for codec 'h264_nvenc', auto-selecting format 'yuv420p'

Why does my FFmpeg H.264 video not play, or fail with a pixel format error?

Screen recordings, ProRes and PNG sequences are often 4:4:4, 4:2:2, RGB or 10-bit. Some encoders and profiles cannot take them, and most browsers and phones only play 8-bit 4:2:0 H.264. yuv420p also needs even width and height.

How to fix it

  1. Add -pix_fmt yuv420p for maximum compatibility.
  2. For 10-bit HEVC use -pix_fmt yuv420p10le (libx265) or p010le (NVENC/QSV).
  3. If FFmpeg complains about odd dimensions, scale with -2: -vf scale=-2:720.
  4. Check the source with ffprobe to see its pix_fmt.

Not sure this is your problem?

Upload your OBS log and StreamRx will tell you exactly what is wrong in 60 seconds, free.

Diagnose my log

📬 The StreamRx newsletter

One short email with OBS fixes, settings for Twitch/YouTube/Kick, and new StreamRx features. Unsubscribe anytime with one click.

No spam. Every email has an unsubscribe link, or reply "unsubscribe" to [email protected].

Related guides