1
votes

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:

what I want

but it looks like this:

what I get

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?

1
How are you checking the input and output? Can you share the source?Gyan
I'm loading the webm into chrome and changing the background by inspecting the page. I can preview the prores version in quicklook. Here is my testing source: dropbox.com/s/fgsk53rh7wqqkbt/original.mov?dl=0Castles
Appears to be an issue with one of your players - possibly quicklook: with ffplay, both commands produce same output - ffplay original.mov -vf scale=alphablend=checkerboard,format=yuv420p and ffplay -vcodec libvpx-vp9 -i square.webm -vf scale=alphablend=checkerboard,format=yuv420pGyan
One possibility is that the browser expects premultiplied pixels - test by running ffmpeg -i square.mov -vf premultiply=inplace=1 -c:v libvpx-vp9 -b:v 0 -crf 31 square-premult.webmGyan
That still seems to output the same result. I've just exported a frame from Motion as PNG and here is the result: dropbox.com/s/4nkuuxaumybc327/default-canvas-settings.png?dl=0 It seems to export ok so could it be something to do with the ProRes format?Castles

1 Answers

3
votes

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.