mpv-player / mpv-player/mpv

Inconsistent HDR video exposure/reference white on external HDR monitor vs MBP XDR internal display

Open
#16,899 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:mac
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
andrewke@Andrews-MacBook-Air ~ % /Volumes/Macintosh\ HD/Applications/mpv.app/Contents/MacOS/mpv --version
Error parsing option target-colorspace-hint (option not found)
/Users/andrewke/.config/mpv/mpv.conf:26: setting option target-colorspace-hint='yes' failed.
Error parsing option gamut-mapping-mode (option not found)
/Users/andrewke/.config/mpv/mpv.conf:56: setting option gamut-mapping-mode='clip' failed.
mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
 built on Sat Jan  8 16:50:23 CET 2022
FFmpeg library versions:
   libavutil       56.70.100
   libavcodec      58.134.100
   libavformat     58.76.100
   libswscale      5.9.100
   libavfilter     7.110.100
Other Information
- macOS version:macOS 26.1 (25B5042k)
- Source of mpv: latest nightly build https://github.com/mpv-player/mpv/actions/runs/18327328279
- Latest known working version: NIL
- Issue started after the following happened:NIL
Reproduction Steps
  1. Use the MPV config below
  2. Attach an external HDR monitor (I am using the Samsung S95F OLED TV)
  3. Use the macOS settings brightness slider to set HDR monitor brightness to SDR~100 nits. Check using console (Display 2 swap brightness: 100.219, limit: nan, indicator brightness: nan, ambient lux: nan, low ambient strength: nan, high ambient strength: nan, contrast preservation: nan, contrast enhancer: nan)
  4. Play 100 203 nit.MOV using MPV attached to this bug report (PQ HDR video containing 100 and 203 nits test pattern)

Config:

autofit-larger=100%x100%
loop-playlist=inf

--hwdec=auto-safe

video-sync=display-resample
vo=gpu-next

--target-colorspace-hint
--target-prim=bt.2020
--target-trc=pq
[HDR]
target-peak=1000
--tone-mapping=clip

profile-cond = p["video-params/colormatrix"]~="dolbyvision" and p["video-params/sig-peak"]>1
--vf-clr

Expected Behavior

I expect the HDR video to have the same exposure on an external HDR monitor as compared to the MacBook Pro 16 in ST2084 reference mode. I expect that the HDR video’s 100 nit test pattern to match the brightness of the 100 nit UI SDR white.

Current behavior:

  • On external HDR monitor, in MPV the 100 nits test pattern is darker than SDR UI white, 203 nits test pattern is the same brightness as SDR UI white. Effectively the video is at half the exposure
  • On MBP 16 M1 Pro internal display in reference ST2084 mode, in MPV the 100 nits test pattern is the same brightness as SDR UI white

In summary, HDR videos are shown as half the exposure on an external HDR monitor

Desired behaviour: There is an option to set reference white. If the user chooses reference white as 100 nits, the following behavior occurs:

  • On both internal and external HDR displays, in MPV the 100 nits test pattern is the same brightness as SDR UI white

In summary, I would like to request for an option to interpret PQ 100 nits as reference white (EDR 1.0) when MPV is used on an external monitor.

Actual Behavior

Current behaviour mentioned previously.

Log File

output.txt

Sample Files

Sample video with test patterns at 100 and 203 nits.
https://github.com/user-attachments/assets/e7b8edb6-48d6-47bc-9c49-65bb36c2b2db

Screenshots of MPV displaying the test patterns. The HDR screenshots are captured in PQ BT2020 space.

Image Image

Note, to view the screenshots in the correct brightness, please use Davinci Resolve in a PQ BT2020 timeline, or use Lightroom in HDR mode and set exposure +1.02

macOS preview is able to show the screenshots, although it is slightly dark. Nonetheless, one can see that the 203 nit screenshot matches SDR white.

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the external-monitor and MacBook Pro XDR comparison with the provided mpv configuration, sample video, and output.txt log. Examine the HDR display and reference-white handling implicated by the reproduction. Done means an agreed option or behavior makes PQ 100-nit content match SDR UI white on both displays.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
audio-video-rtc, desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.