Reputation: 957
I've been trying to convert a video encoded in ProRes 4444HQ to webm vp9. I created an example video with a 50% transparent square in it. It should look like this:
but it looks like this:
Here is how I'm converting the video:
ffmpeg -i square.mov -c:v libvpx-vp9 -b:v 0 -crf 31 square.webm
I've tried changing color spaces and choosing different profiles but I can't seem to get rid of the grey shadow. Does it have something to do with the conversion from yuva to rgba?
Upvotes: 2
Views: 3194
Reputation: 93068
Looks like the ProReS has premultiplied pixels and the MOV from Motion has set a flag in the MOV indicating that but the WebM hasn't / can't, so the browser doesn't compensate.
Running
ffmpeg -i square.mov -vf unpremultiply=inplace=1 -c:v libvpx-vp9 -b:v 0 -crf 31 square-premult.webm
should produce a WebM with straight pixels handled correctly by the browser.
Upvotes: 5