I need some help/advice.
I run the website http://www.getlazarus.org and along the top of the main page I embed an h.264 mp4 ... the video file is http://cache.getlazarus.org/images/lazarus.mp4
The problem is, on some computers/web browsers the video is showing with a lightened gamma correction, making the background solid white and also creating a seam with the clouds on the right, when the video background is supposed to have an off white page texture and no seam in the clouds.
On Windows 7 using Chrome and Firefox it looks perfect, but on IE I get a pure white and can see the seam. On another different Windows 7 computer under IE it looks perfect, but Chrome shows a pure white background and I can see the seam. On Linux I always see the seam. I've tried re-encoding the original video with varying settings, but can't find any which work correctly across the all browsers/operating systems.
To me, in my limited knowledge, it's as if there is some kind of gamma correction going on where sometime a decoder lightens the whole video, bleeding out the background, which I don't want.
Where do I go from here?
Thanks in advance for your help/advice.
+ Reply to Thread
Results 1 to 9 of 9
-
-
I'd assume it's a TV vs PC luminance levels issue.
Normal video uses limited range luminance levels (16-235). PCs use full range levels (0-255) so the limited levels need to be expanded to full range for the video to display correctly when it's viewed on a PC. How various browsers do it, I don't know, and video cards can be set to expand the levels also.
If that's the issue, this might help explain it. Ignore the section on "which combinations give the wrong levels" as it's completely out of date. It's mostly referring to incorrect levels when playing video with a media player and how to fix them, but hopefully it'll help you understand the problem.
http://avisynth.nl/index.php/Luminance_levels
If I'm correct and that is the problem, I suspect your sample MP4 is using the wrong luminance range. It displays with a pure white background on my PC (it's set to expand the levels correctly), which is what you don't want. So when it's displaying with a pure white background for your testing, that's probably when it's being displayed "correctly", even if it doesn't look right. In order for the video to display as you want it to, it probably needs to go through a PC to TV levels conversion when it's encoded.
The downside will be the times when it currently appears to display correctly at the moment. It no longer will. It'll probably look a bit washed out. How it's displayed is possibly out of your hands to a certain extent, but maybe someone else will know. I know nothing about displaying video in a browser.
Here's how your sample looks to me:
Here's how it looks after the levels have been converted from full range to limited range:
If that's the difference you're seeing then I think the video needs to be converted to limited range levels when it's encoded. Where it's currently displaying "pure white" at the moment, that will be the times it'll display correctly after it's converted. The times when at the moment it looks right, it won't look right any more (maybe a bit washed out), because they're the times it's technically not being displayed correctly (the levels aren't being expanded).
Hopefully all that makes sense, and as I said, if I'm correct, I don't know how to get all browsers to display the video the same way.
Edit: Can the video the converted to a gif? Images are always full range so an animated gif should display correctly all the time.Last edited by hello_hello; 7th Feb 2015 at 09:09.
-
Last edited by jagabo; 7th Feb 2015 at 10:41.
-
Okay, thanks for the replies. I'll look into how to configure luminance settings.
-
It is more of a matrix issue.
It's just a total mess: "TV levels", "PC levels", different matrices depending on video sizes, it's actually unfathomable how we got ourselves in such a big mess in the first place. Well, there are reasons, but let's stay on topic!
Just render the video BT601 if is is SD size and BT709 if it is HD and respect PC levels. If it is rendered on a PC it should automatically expand to video levels, unless of course the video card setting are wrong. -
When you refer to flagging it as bt470bg or bt709 are you referring to flagging it as full range also? I'm maybe having a dumb moment, but I can't get my head around using just bt470bg or bt709 to get it to display with the correct levels. I'd have thought if anything it'd have the opposite effect and bt470bg or bt709 on their own would be likely to imply limited levels.
-
Yes, you are correct. I screwed up yesterday. When I did my quick conversion it looks like the software automatically converted from PC range to TV range (I didn't check the output file closely and assumed it was still PC range). The best thing to do is explicitly convert the video from PC range to TV range and flag it (bt470bg or bt709) to improve the chances that the player will display it with the correct colors.
-
Did you convert the sample MP4 or just a pic? It seems odd software would change the levels when converting YUV video.
Maybe another format might work better? Animated gif, mjpeg video.... something that's full range by default. I really don't know much about video support in browsers.
While I'm asking, any idea what newpball is on about? Respect PC levels and it'll be automatically expanded to video levels? Makes no sense to me.
By the way, I replied to your post in the Handbrake thread. I'm just curious what you might think about what I was thinking. -