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

<p>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:</p>

<h3>Chrome</h3>

<p><a href="https://i.sstatic.net/trukn.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/trukn.gif" alt="Chrome WebM vs MP4"></a></p>

<h3>Firefox</h3>

<p><a href="https://i.sstatic.net/AKbbU.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AKbbU.gif" alt="Firefox WebM vs MP4"></a></p>

<p>The original issue was with videos that I was re-encoding myself with <code>ffmpeg</code>:</p>

<pre><code>ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2M output.webm
</code></pre>

<p>I thought it might be related to the CLI options I was passing in, so I tried playing around with some other <a href="https://trac.ffmpeg.org/wiki/Encode/VP9" rel="nofollow noreferrer">encoding option</a> (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 <a href="https://cloudinary.com/" rel="nofollow noreferrer">cloudinary</a>, and I figured if I am seeing the differences there, it probably doesn't have anything to do with my encoding option flags.</p>

<p>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).</p>

CC BY-SA 4.0
2019-01-16T10:03:38.673Z
If you disable hardware video decode in Chrome, is the rendering still different?
Gyan
CC BY-SA 4.0
2019-01-16T15:56:51.197Z
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
CC BY-SA 4.0
2019-01-16T17:18:07.287Z
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 https://bugs.chromium.org/p/chromium/issues/detail?id=851216
Gyan
CC BY-SA 4.0
2019-01-16T19:15:48.277Z
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
<ffmpeg><color><vp9><rendering>
Chrome renders WebM Video "darker" than other browsers / media players
romellem
# Chrome renders WebM Video "darker" than other browsers / media players

(Asked by: username_0 on 2019-01-15)

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

Firefox

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).

**Tags:** ffmpeg, color, vp9, rendering

> **Comments:**
> **username_1**: If you disable hardware video decode in Chrome, is the rendering still different?  
> **username_0**: 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?  
> **username_1**: 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 https://bugs.chromium.org/p/chromium/issues/detail?id=851216  
> **username_0**: 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.  

---

## 0 answers

