mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.31k stars 2.9k forks source link

Washed out color / How to get color profile working on Windows #13414

Closed Tama47 closed 1 month ago

Tama47 commented 8 months ago

Important Information

Provide following Information:

If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

--no-config look normal but slightly washed out compared to with color profile Screenshot 2024-02-05 at 02 30 40

--icc-profile-auto look even more washed out Screenshot 2024-02-05 at 02 32 04

Also tried using absolute path in the config file icc-profile="C:\Users\Tama\AppData\Roaming\mpv\LG TV SSCR2-13C3DD0B-A82A-4FBB-A3AD-FE07A604DA13.icc" but still could not get the color profile to show up. See Actual behavior

Expected behavior

Screenshot 2024-02-05 at 02 14 54 Screenshot 2024-02-05 at 02 11 45 Color profile show up correctly on Mac.

Actual behavior

Screenshot 2024-02-05 at 02 16 06 Screenshot 2024-02-05 at 02 13 05 Color profile does not show up on Windows.

Log file

output.txt

Sample files

LG TV SSCR2-13C3DD0B-A82A-4FBB-A3AD-FE07A604DA13.icc.zip (zip because GitHub doesn't support icc)

Raza-0007 commented 8 months ago

@Tama47

I know your question is about color profile but try this first.

Add the following to your config for better video color on your Win 11/Nvidia based system. At least it gives me better colors on my system:

vo=gpu-next gpu-api=vulkan

The following is optional but I get better and consistent colors by letting Nvidia manage the following three settings in Nvidia control Panel:

Change resolution Adjust desktop color settings
Adjust Video color settings

Hope this helps

~Raza

Tama47 commented 8 months ago

Thanks for the suggestions! I've tried both the mpv config and letting Nvidia handle the color settings. It seems to have better consistency with the color, but in darker area, the image are still blown out and overall color still seem a bit more pale compared to the Mac with the correct color profile set up. I will keep the new settings, since it improves the color a little, but would like to still be able to use the correct color profile.

Raza-0007 commented 8 months ago

Looks like you icc profile is set and opened, but then ignored for some reason.

[ 0.265][v][cplayer] Setting option 'icc-profile' = 'C:\Users\Tama\AppData\Roaming\mpv\LG TV SSCR2-13C3DD0B-A82A-4FBB-A3AD-FE07A604DA13.icc' (flags = 4)

[ 3.777][d][global] user path: 'C:\Users\Tama\AppData\Roaming\mpv\LG TV SSCR2-13C3DD0B-A82A-4FBB-A3AD-FE07A604DA13.icc' -> 'C:\Users\Tama\AppData\Roaming\mpv\LG TV SSCR2-13C3DD0B-A82A-4FBB-A3AD-FE07A604DA13.icc'

[ 3.777][v][vo/gpu] Opening ICC profile 'C:\Users\Tama\AppData\Roaming\mpv\LG TV SSCR2-13C3DD0B-A82A-4FBB-A3AD-FE07A604DA13.icc'

Mpv then later loads the default icc profile

[ 3.841][v][vo/gpu/win32] color-profile: C:\WINDOWS\system32\spool\drivers\color\LG TV SSCR2-A1E9AC9C-6CED-491E-91AE-89A39BC396AF.icc

Try this:

Delete these from your config

hwdec-codecs=all hwdec=auto-copy

I am assuming you are still using vo=gpu-next and gpu-api=vulkan. With these settings your gpu will decode the video with nvdec using your custom icc profile, and directly send the output to the display, avoiding the copy-back path. The copy-back may be causing your cpu to use the default icc profile.

If this does not work then you can always set your custom icc profile as the default color profile for your system.

~Raza

haasn commented 8 months ago

^ hwdec shouldn't have anything to do with ICC. The ICC profile application happens entirely inside the renderer (either --vo=gpu-next or --vo=gpu), as well as in the graphics adapter (for embedded calibration curves).

As for OP's question, it seems that the ICC profile you provided is of a very wide gamut display. Getting less saturated colors during conversion to a wide gamut display is not surprising. How did you obtain this ICC profile? Did you measure it yourself?

Based on your original screenshots what you're trying to solve is not a question of ICC profiles, but of transfer functions. Try --target-trc=gamma2.2, alternatively --vf format=gamma=gamma2.2.

Raza-0007 commented 8 months ago

^ hwdec shouldn't have anything to do with ICC. The ICC profile application happens entirely inside the renderer (either --vo=gpu-next or --vo=gpu), as well as in the graphics adapter (for embedded calibration curves).

@haasn, your knowledge in this area far outstrips mine. I was just trying to come up with a possible cause/explanation as to why mpv loads OP's custom icc color profile, but then ignores it, and uses the default System32 icc profile.

~Raza

haasn commented 8 months ago

^ hwdec shouldn't have anything to do with ICC. The ICC profile application happens entirely inside the renderer (either --vo=gpu-next or --vo=gpu), as well as in the graphics adapter (for embedded calibration curves).

@haasn, your knowledge in this area far outstrips mine. I was just trying to come up with a possible cause/explanation as to why mpv loads OP's custom icc color profile, but then ignores it, and uses the default System32 icc profile.

~Raza

I think that's just the vo backend telling us about the ICC profile configured on the display (or possibly a second display?), but since OP didn't provide --icc-profile-auto, it wouldn't be used anyway.

Tama47 commented 8 months ago

Thanks @haasn and @Raza-0007

As for OP's question, it seems that the ICC profile you provided is of a very wide gamut display. Getting less saturated colors during conversion to a wide gamut display is not surprising. How did you obtain this ICC profile? Did you measure it yourself?

The ICC profiles were auto-generated when I connected my Mac to the LG TV. I thought that the reason for the different colors was due to the Windows system not using the correct color profile. But as pointed out by @Raza-0007, it seems that the system defaults to the auto-generated ICC profile for the TV on Windows as well.

Based on your original screenshots what you're trying to solve is not a question of ICC profiles, but of transfer functions. Try --target-trc=gamma2.2, alternatively --vf format=gamma=gamma2.2.

I think you could be right, but as I've tried your commands, I'm still not getting the desired results. Also, I'm not sure if I was doing something wrong, but --vf format=gamma=gamma2.2 gave me an error, while --vf=format=gamma=gamma2.2 seems to work. I tried mpv --vf=format=gamma=gamma2.4 https://www.crunchyroll.com/watch/GX9UQW2Q8/episode-05, which gave the closest to the Mac color, but still not quite as vibrant.

Mac (output.txt) Screenshot 2024-02-11 at 01 45 46

Windows with --target-trc=gamma2.2 Screenshot 2024-02-11 at 01 48 29 and --target-trc=gamma2.4 Screenshot 2024-02-11 at 01 50 14

--vf=format=gamma=gamma2.2 Screenshot 2024-02-11 at 01 52 01 --vf=format=gamma=gamma2.4 Screenshot 2024-02-11 at 01 53 13 output.txt

hooke007 commented 8 months ago

it seems that the system defaults to the auto-generated ICC profile for the TV on Windows as well.

The auto-generated icc is usually bullshxt because it was made from the unreliable EDID info.