New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 830567 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 828599
Owner:
Last visit > 30 days ago
Closed: Dec 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

HTML5 video player displays wrong colors of mp4 video

Reported by world.best.hacker.h403@gmail.com, Apr 9 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Visit this url: https://trac.ffmpeg.org/ticket/7115
2. Follow the steps there
3. Open the file "1.mp4" in the Chrome
4. Notice that the video is darker than it should be

What is the expected behavior?
The video should be brighter

What went wrong?
ffmpeg developers said that is is probably the issue with video drivers or video player I'm using. My video drivers are fine, so therefore it means it must be an issue with Chrome, because I tested in Chrome and observed the bug. I'm also uploading here the 1.mp4 file (output of ffmpeg).

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 6.3
Flash Version: /

Contents of chrome://gpu: 
GPU content is in the attached archive

If you have any additional question (and/or some steps are unclear) let me know. I would like to help to resolve this issue as soon as possible. Thanks.
 
1.zip
8.3 KB Download
Cc: ccameron@chromium.org
Owner: hubbe@chromium.org
Status: Assigned (was: Unconfirmed)
Presumably this is another color space tagging issue.

Comment 2 by hubbe@chromium.org, Apr 20 2018

For me the colors come out the same.
Perhaps you have an ICC profile installed?
Chrome videos are color managed, which means that the ICC profile is respected, but images are only color manged if the image contains an ICC profile.
Thus the image color values would not be affected by the ICC profile, but the video is.

Sorry, but I have no idea what is an ICC profile. I am pretty sure I don't have any external programs or services installed. If ICC is some program, I for sure didn't install it. If it is a Chrome feature, I am sure I didn't enable it. Notice that the video colors are fine in other browsers and in all media players I've tried so far.

I made a screen recording video about this issue: https://www.youtube.com/watch?v=2mY1M0yK0ck
Please take a look at it.

Can you please explain what an ICC profile is and how can I uninstall it? Is it an external program, a Chrome feature, or graphical driver?

Comment 4 by hubbe@google.com, Apr 20 2018

ICC (or ICM) files are monitor color profiles, which helps assure color accuracy.
Unfortunately, many programs ignore color profiles.
Your monitor may have come with a driver disk that installed it for you, or, it's possible that the problem is something completely different.


I didn't install any single driver manually. Windows did everything for me. I am not sure how to check if ICC is enabled or not. Found some articles about it and they are telling me that if I want to disable ICC, then I need to remove ICC driver files from windows driver folder which is located at "C:\Windows\System32\spool\drivers\color"

There is nothing like ICC or ICM in that folder (as it can be seen on the screenshot). However, in the "gpu.htm" file I posted in comment #0, I found line "icc_profile_id:0". Does it mean my ICC is enabled? If yes, how can I disable it?

Posting both screenshots here, so you can take a look.

Comment 6 by hubbe@google.com, Apr 21 2018

I can see from this screenshot that you do not have an ICC profile installed, so that's not the issue here. I'm going to try it in a couple of machines and see if any of them exhibit this issue, in the meantime, could you post the full content of about:gpu? (Not a screenshot please, instead attach the file or just do a cut-and-paste)

I think you didn't see that I've already posted full content of about:gpu in the archive in comment #0 (not a screenshot, but the gpu.htm document). Hope it helps.

Comment 8 by hubbe@google.com, Apr 21 2018

Ops, sorry I missed that.

Comment 9 by hubbe@google.com, Apr 21 2018

Took a look at the gpu page, and I think in your case the display driver is doing tbe work of converting YUV colors to RGB colors. I will try it on a windows machine with an nvidia gpu and see if I get the same result.

Comment 10 by hubbe@chromium.org, May 18 2018

I did some additional testing on this.
However, I get different results if I use your 1.mp4 or if I create my own.
I downloaded you png file and ran: ffmpeg -i 1.png -y 1B.mp4
The resulting file (attached) looks fine to me, not sure why it doesn't with your file. I am using ffmpeg version 3.4.2-1, which came with my ubuntu installation.

It depends on the size of the video. The PNG file I posted at FFMPEG issue is actually smaller than 1920x1080, so the video becomes brighter. If you screenshot the chrome while playing the video you posted, and then paste in Paint and analyze colors, you will find out that the color is actually rgb(70, 253, 255). However, if you create a 1920x1080 image (with color rgb(0, 255, 255)) and then convert it to video, it becomes darker than expected.

I think for about 640x480 colors look the same, everything smaller looks brighter and everything larger looks darker. Can you please confirm it?

Comment 12 by hubbe@chromium.org, May 22 2018

It looks like we are still guessing color spaces based on resolution in some cases. I will try to fix that. Unfortunately *right* answer is the one that happens with larger images. The reason for this is that ffmpeg defaults to rec601 when converting RGB to yuv, while chrome defaults to rec 709.

For best result, you should tag the video with the color space you actually used when creating the video. For some reason ffmpeg doesn't do this by default.

I can't say that I fully understand what you've said, but I am pretty sure there are no issues with ffmpeg (my issue on their tracker has been closed as invalid with the explanation that there are no issues with ffmpeg at all).

I'm not very familiar with color spaces etc, the only thing I know is that if I have a png file (or a list of png files) and convert them to mp4 video, using whatever software, the output video should have the same (or almost the same) colors as the input. It makes no sense to me that colors of the output video depend on the resolution or any other parameters.

If you think there is an issue with ffmpeg, can you please report the issue to ffmpeg tracker, since my original issue is invalidated. But anyway, notice that there are no issue with Firefox: it displays the video with the exact same colors as the input png file, independently of the resolution or the duration of the video.
Any update on this? I see the same problem on my Win 10 machine and latest Chrome.
Mergedinto: 828599
Status: Duplicate (was: Assigned)

Sign in to add a comment