Even though it explicitly set -pix_fmt yuv420p, FFmpeg is ignoring it.
Here is why: The -vf (video filter) graph resets the pixel format to match the source right before it hits the encoder. Because scale and fps process the native sRGB colorspace, these pass that sRGB data straight to libvpx-vp9, completely bypassing the -pix_fmt yuv420p flag.
To fix this, it need to force the color conversion inside the video filter chain itself using format=yuv420p as the very last step of -vf argument.
Even though it explicitly set
-pix_fmt yuv420p, FFmpeg is ignoring it.Here is why: The
-vf(video filter) graph resets the pixel format to match the source right before it hits the encoder. Becausescaleandfpsprocess the native sRGB colorspace, these pass that sRGB data straight tolibvpx-vp9, completely bypassing the-pix_fmt yuv420pflag.To fix this, it need to force the color conversion inside the video filter chain itself using
format=yuv420pas the very last step of-vfargument.