mpv-player / mpv

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

4K-UHD Blu-ray subtitles darker on MPV #8325

Closed nehalem501 closed 1 year ago

nehalem501 commented 3 years ago

Important Information

Provide following Information:

Reproduction steps

Play the 4K UHD blu-ray release of Spiderman 1 (2002), I made the rip myself with makemkv. I'm playing this on a regular SDR 1080p monitor without any custom config.(I've attached a sample file which has the problem below) I've also tried this with the latest MPV version on macOS and with VLC, the same bug is present (might be an ffmpeg bug)

Expected behavior

Subtitles should be white. Here is a picture taken on my SDR 1080p TV with a 4K UHD blu-ray player playing the disc where we can see the expected behaviour. IMG_4416

Actual behavior

Subtitles are grey instead of white. Here is a screenshot. mpv-shot0001

Log file

https://0x0.st/iRI2.txt

Sample files

https://0x0.st/iRI_.mkv

sfan5 commented 3 years ago

The subtitles in the picture taken from your TV look grey to me, just a lighter shade. In fact the whole picture seems awfully bright so entirely from "feeling" I'd consider mpv's rendering more accurate.

Have you compared the colors of mpv and your Bluray player both attached to your TV?

nehalem501 commented 3 years ago

Ok I've tried to do a better comparison, both pictures are of the same monitor with a DSLR on manual mode to have the exact same exposure. On the UHD blu-ray drive (Panasonic DP-UB820) the subtitles are a much lighter grey than the MPV output. In person the difference is much more visible than on these pictures. The text layout difference is because there are 2 different English subtitles tracks (the color is identical across all subs tracks) and I've selected the wrong one on the player.

The top picture is MPV, the bottom one the dedicated player. IMG_4420 IMG_4421

jeeb commented 3 years ago

For the record, this is because the subtitles end up handled as 100 nits, which is the good ol' SDR peak white. Except apparently for HDR you're supposed to bump it to 203 nits. You either handle the bumping, or then you apply the tone mapping before the subtitles are overlaid (since they IIRC are just SDR).

Where the current behavior semi-accidentally ends up working correctly is output to HDR, where the SDR subtitle surface gets bumped to 203 nits. See the difference before/after the recent BT.2390 tone mapping changes, where this bumping got added (the crappy tone mapping is by Windows itself in these images). bt2390-01-before bt2390-02-after

laichiaheng commented 3 years ago

For the record, this is because the subtitles end up handled as 100 nits, which is the good ol' SDR peak white. Except apparently for HDR you're supposed to bump it to 203 nits. You either handle the bumping, or then you apply the tone mapping before the subtitles are overlaid (since they IIRC are just SDR).

Where the current behavior semi-accidentally ends up working correctly is output to HDR, where the SDR subtitle surface gets bumped to 203 nits. See the difference before/after the recent BT.2390 tone mapping changes, where this bumping got added (the crappy tone mapping is by Windows itself in these images). bt2390-01-before bt2390-02-after

Is there a workaround for it in MPV? It seems like --blend-subtitles=yes fix this issue, but I remember that --blend-subtitles does not work well with HDR content, has it been fixed?

kasper93 commented 1 year ago

For gpu-next this should be fixed by https://github.com/mpv-player/mpv/commit/704afb89681bc6d7fb87cce0a389444de3fac2a0 I guess we can close this issue.

nehalem501 commented 1 year ago

Ok, I'll try the latest version with gpu-next