mpv-player / mpv

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

Playback dim when display color space set to Rec. ITU-R BT.2020-1 #15138

Open low-batt opened 1 week ago

low-batt commented 1 week ago

mpv Information

mpv v0.39.0-170-g37159a8ee0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Oct 20 2024 00:54:23
libplacebo version: v7.349.0 (v7.349.0-18-g9e16c86f)
FFmpeg version: n7.1
FFmpeg library versions:
   libavcodec      61.19.100
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- macOS version: macOS 15.0 (24A335)
- Source of mpv: My own build of master using mpv-build
- Introduced in version: Unknown

Reproduction Steps

On a Mac that supports Extended Dynamic Range and is running macOS Sequoia:

Expected Behavior

With the Color profile of the display to Rec. ITU-R BT.2020-1 the video looks somewhat similar how it looks when played with the Quicktime Player.

Actual Behavior

With the Color profile of the display to Rec. ITU-R BT.2020-1 the video is so dark that it is hard make out what is being shown. This screenshot shows mpv on top and the Quicktime Player below: Profile-changed

With the Color profile changed back to the default: Profile-default

This also happens with the Color profile set to Rec. ITU-R BT.709-5. With other Color profile settings this does not occur.

For the screenshots mpv was run like so:

mpv/build/mpv --no-config --gpu-debug --log-file=output.txt --autofit=50% --pause --script-opts-append=osc-visibility=always --start=1:16 --target-colorspace-hint --tone-mapping=auto --target-peak=500 --vo=gpu-next ~/Movies/Advanced\ stream\ H.264\:HEVC\:UHD\:Dolby\ Vision\:Dolby\ Digital\:Dolby\ Atmos.mp4 

This was reported against IINA in issue https://github.com/iina/iina/issues/5218

Log File

output.txt

Sample Files

I downloaded a copy of the Apple Advanced stream example "H.264/HEVC/UHD/Dolby Vision/Dolby Digital/Dolby Atmos streaming" from here.

Media info: ```text low-batt@urp Movies$ mediainfo Advanced\ stream\ H.264\:HEVC\:UHD\:Dolby\ Vision\:Dolby\ Digital\:Dolby\ Atmos.mp4 General Complete name : Advanced stream H.264:HEVC:UHD:Dolby Vision:Dolby Digital:Dolby Atmos.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/dby1/iso2/mp41) File size : 291 MiB Duration : 1 min 38 s Overall bit rate : 24.7 Mb/s Frame rate : 23.976 FPS Writing application : Lavf61.1.100 Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5@High HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible Codec ID : hvc1 Codec ID/Info : High Efficiency Video Coding Duration : 1 min 38 s Source duration : 1 min 38 s Bit rate : 23.0 Mb/s Maximum bit rate : 24.0 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.116 Stream size : 270 MiB (93%) Source stream size : 281 MiB (97%) Title : Core Media Video Language : English Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : BT.2020 Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 1375 cd/m2 Maximum Frame-Average Light Level : 188 cd/m2 Codec configuration box : hvcC Audio ID : 2 Format : E-AC-3 JOC Format/Info : Enhanced AC-3 with Joint Object Coding Commercial name : Dolby Digital Plus with Dolby Atmos Codec ID : ec-3 Duration : 1 min 38 s Bit rate mode : Constant Bit rate : 768 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Compression mode : Lossy Stream size : 9.01 MiB (3%) Title : Core Media Audio Service kind : Complete Main Default : Yes Alternate group : 1 Complexity index : Not present / 16 Number of dynamic objects : 15 Bed channel count : 1 channel Bed channel configuration : LFE Dialog Normalization : -27 dB compr : -0.28 dB dialnorm_Average : -27 dB dialnorm_Minimum : -27 dB dialnorm_Maximum : -27 dB low-batt@urp Movies$ ```

I carefully read all instruction and confirm that I did the following:

low-batt commented 1 day ago

An IINA user is encountering this without changing the display settings from the default, but so far I've not been able to trigger the problem that way.