2

Not sure if this is the correct community, but I have a question about video encoding and decoding.

I have a video that gets served in MP4 or WebM formats, depending on browser support. I noticed that in chrome, the WebM is noticeably darker than when viewing the files locally in VLC, or even another browser such as Firefox:

Chrome

Chrome WebM vs MP4

Firefox

Firefox WebM vs MP4

The original issue was with videos that I was re-encoding myself with ffmpeg:

ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2M output.webm

I thought it might be related to the CLI options I was passing in, so I tried playing around with some other encoding option (such as using Constant Quality (CQ) mode and two-pass encoding) but still saw the brightness differences in Chrome. After that, I noticed these same issues on media that was automatically encoded from cloudinary, and I figured if I am seeing the differences there, it probably doesn't have anything to do with my encoding option flags.

Before I go too much down the rabbit hole here, is there anything I can control with this? Or is this just an issue with the decoder Chrome happens to be using (which is different that what VLC or Firefox is using).

4
  • If you disable hardware video decode in Chrome, is the rendering still different?
    – Gyan
    Jan 16, 2019 at 10:03
  • Huh, that does fix it! Navigating to chrome://flags/#disable-accelerated-video-decode, the option was set to Enable (which I think means it was using hardware video decoding, the option name is a bit confusing...). Setting that to Disable and then relaunching Chrome, and the WebM video displays the same as the MP4. So it seems like a bug with GPU decoding?
    – romellem
    Jan 16, 2019 at 15:56
  • 2
    Yes, either the decoder isn't passing along the colorimetry info or the renderer in that pipeline isn't acting on it. See existing issue at bugs.chromium.org/p/chromium/issues/detail?id=851216
    – Gyan
    Jan 16, 2019 at 17:18
  • I tried lookup up a relevant chromium bug earlier but didn't come across that one. That looks to be exactly the issue I'm seeing! Thanks for all your help.
    – romellem
    Jan 16, 2019 at 19:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.