0

I'm trying to convert a simple animation from MOV to WEBM so it can be used as an OBS alert for my Twitch stream.

However, when I convert using FFMPEG, the colour is slightly washed out.

As you can see on the left red line, the right half (WEBM) is washed out compared to the left half (MOV).

This is what I'm currently using:

ffmpeg -i "file_name.mov" -c:v libvpx-vp9 -lossless 1 -auto-alt-ref 0 "file_name.webm"

I was not expecting the colour to be slightly washed out.

Is there anyway to ensure that the WEBM, once converted from the MOV file does not lose its colour?

Many thanks.

Here is the "file_name.mov": https://drive.google.com/file/d/1pJpSC4RbNFV-WBILdKfBSzua1qVaXxw0/view?usp=sharing

2
  • Can you please share the video file file_name.mov (or a small part of it)? (Share the file using Google Drive for example).
    – Rotem
    Commented Oct 17, 2023 at 20:08
  • Hey Rotem, I have added Google Drive Link to the original video. Commented Oct 18, 2023 at 12:06

1 Answer 1

0

libvpx-vp9 codec selected yuva420p output pixel format, because you didn't specify -pix_fmt argument.

Since we are looking for lossless encoding, we may add -pix_fmt gbrp:

ffmpeg -y -i "file_name.mov" -c:v libvpx-vp9 -lossless 1 -auto-alt-ref 0 -pix_fmt gbrp "file_name.webm"


The pixel format conversion from RGBA (format of the MOV file) to YUVA420 applies chroma subsampling, that may affect the colors.

Note: When adding -pix_fmt gbrp the alpha (transparency) channel is lost when converting to gbrp (but VP9 doesn't support rgba pixel format as the MOV RLE codec).


It looks like there is also a bug in FFmpeg (or miss compatibility between FFmpeg and video players) regarding the pixel format conversion.

The colors of the following conversion looks almost perfect when played with VLC, but washed out when played with MPC-HC (for example):

ffmpeg -y -i "file_name.mov" -c:v libvpx-vp9 -vf "scale=out_color_matrix=bt709:dst_range=1:dst_format=yuv420p" -lossless 1 -auto-alt-ref 0 -pix_fmt yuv420p -bsf:v vp9_metadata=color_space=bt709 "file_name2.webm"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .