Chrome Html5 video can't display white, has gray background
Here's a simple fix, I simply upped the brightness using a webkit filter. I was going to draw it onto canvas and then filter the pixels, which should be much smoother, but I cannot access your video through cross-domains. Instead I just used the css style
video{
-webkit-filter: brightness(108.5%);
}
Edit: This has been fixed on the latest version of Chrome I believe.
Run CMD
Updated on June 04, 2022Comments
-
Run CMD almost 2 years
We have an intro page which plays a html5 video before the main site content is displayed. The video has a white background so it integrates seemlessly with the page background. However, in the chrome browser the whole video has a gray background.
Apparently, these questions from 2011 indicate this was/is a bug in chromium. They also state the bug was gone in the latest chrome update. However, I downloaded the latest chrome version, 27.0.1453.110 m, and the problem is still there?
html 5- Videos - White is washed off in Chrome
Unwanted Background color/artifact on HTML5 Video Tag
Does anyone have any solution or workaround for this problem ? ... This bug renders our whole project useless ... It seems unbelievable to me that despite of the html5 hype, chrome can't play whites in videos since 2011 ??
....... EDIT ....................................................
Ok, I've created a jsfiddle project : http://jsfiddle.net/Ykmya/5/
<body> <video id="introVideo" width="774" height="400" oncanplay="playIntroVideo()"> <source src="http://users.telenet.be/A-I/ChromeBugTest.mp4" type="video/mp4" /> Uw browser ondersteunt geen html5 video </video> </body>
When viewed with Chrome, you will see the gray background
........ EDIT 2 ..................................................
using pandavengers answer, I added this css, which has an acceptable result :
@media screen and (-webkit-min-device-pixel-ratio:0) { video{ -webkit-filter: brightness(108.5%); } }
-
pandavenger almost 11 yearsI took an screenshot and then used Paint to read the RGB values and they are relatively close (+/- 1) to the intended values
-
pandavenger almost 11 yearsyou might want to create Javascript to check the browser is Chrome and not anything else and THEN apply the filter, my example is just an extremely simplified example
-
Run CMD almost 11 yearsI think this selector applies the filter only to webkit browsers, namely Chrome and safari : @media screen and (-webkit-min-device-pixel-ratio:0) {}
-
pandavenger almost 11 yearsyeah, I was just afraid safari videos might become very bright. well, good luck!
-
Brian over 9 yearsThis works, thanks! 108.5% was a little intense. I found that 101% was closer to the original values for my project.
-
pandavenger about 9 years@Brian AFAIK the video brightness issue has been fixed a long time ago. You no longer need to compensate for anything and setting 101% is not necessary. My answer was simply a temporary workaround for a bug in Chrome.
-
aruno about 9 years@pandavenger nope - it's not completely fixed, but it's definitely graphics card dependent or something else environmental :-(
-
pandavenger about 9 years@Simon_Weaver ah man, that sucks, I haven't encountered an issue like it for a while, thanks for informing me though.
-
aruno about 9 yearsbigger issue on powerful machines with crazy graphics setups. most laptops I've tested are very light gray or white. has been verified on 4 machines now, in two separate environments (all graphics people). ipad / Mac is 100% white
-
James Tudsbury about 6 yearsIn my instance the video on Chrome was displaying too dark. I set brightness(100%) and this fixed it without breaking it on Firefox (where it was already working ok)