mpv Information
mpv v0.41.0-dev-g41f6a6450 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Dec 21 2025 19:30:47
libplacebo version: v7.358.0
FFmpeg version: f853d12
FFmpeg library versions:
libavcodec 62.11.100
libavdevice 62.1.100
libavfilter 11.4.100
libavformat 62.3.100
libavutil 60.8.100
libswresample 6.1.100
libswscale 9.1.100
Other Information
- Microsoft Windows 11 [version 10.0.26200.8737]
- GPU model, driver and version: NVIDIA GeForce RTX 3080 (Driver: 610.88)
- Source of the mpv binary: GitHub (mpv v0.41.0-dev-g41f6a6450)
- Latest known working version: this is not a regression, but an unhandled edge-case with degenerate mastering primaries
- Issue started after the following happened: Playing a video file with corrupted/degenerate mastering display primaries metadata (blue primary coordinates matching the D65 white point)
Reproduction Steps
- Play the provided sample using
gpu-next with default/clean settings:
mpv --no-config --vo=gpu-next sample.m2ts
- Press
i (or Shift+I then 2) to open stats.lua and inspect the colorimetry details.
- Observe that the video reports degenerate primaries:
Primaries: [0.708 0.292, 0.170 0.797, 0.313 0.329, 0.313 0.329] in bt.2020 (the blue primary is corrupted and matches the D65 white point).
- Observe the resulting severe rendering distortion (blown-out highlights, black crush, and loss of color balance) in both SDR tone-mapping and HDR passthrough modes.
- Attempting to override the stream primaries via
--vf=format=primaries=bt.2020 does NOT fix the issue, as gpu-next / libplacebo continues to use the corrupted ST 2086 mastering display metadata attached to the video frames.
Expected Behavior
libplacebo / mpv should implement a sanity check on mastering display chromaticity coordinates:
- Verify that the chromaticity coordinates form a valid, non-degenerate triangle (non-zero area, blue primary != white point).
- If the mastering display primaries are degenerate/invalid or produce an ill-conditioned color transformation matrix,
gpu-next should discard the broken mastering metadata and gracefully fall back to the nominal container primaries (bt.2020).
- (Optional / Quality of life) Provide a way to ignore or override bad mastering metadata (e.g.
--hdr-metadata=no or similar).
Actual Behavior
gpu-next evaluates the degenerate mastering primaries matrix without validation, producing severe color corruption (extreme solarization / clipping). Because the metadata is attached at the frame/decoder level, user-side format filters cannot override it.
Log File
mpv.log
Sample Files
Sample file : https://www.mediafire.com/file/awsijs1e4ligx8l/sample.zip/file
I carefully read all instruction and confirm that I did the following:
mpv Information
Other Information
Reproduction Steps
gpu-nextwith default/clean settings:mpv --no-config --vo=gpu-next sample.m2tsi(orShift+Ithen2) to openstats.luaand inspect the colorimetry details.Primaries: [0.708 0.292, 0.170 0.797, 0.313 0.329, 0.313 0.329] in bt.2020(the blue primary is corrupted and matches the D65 white point).--vf=format=primaries=bt.2020does NOT fix the issue, asgpu-next/libplacebocontinues to use the corrupted ST 2086 mastering display metadata attached to the video frames.Expected Behavior
libplacebo/mpvshould implement a sanity check on mastering display chromaticity coordinates:gpu-nextshould discard the broken mastering metadata and gracefully fall back to the nominal container primaries (bt.2020).--hdr-metadata=noor similar).Actual Behavior
gpu-nextevaluates the degenerate mastering primaries matrix without validation, producing severe color corruption (extreme solarization / clipping). Because the metadata is attached at the frame/decoder level, user-side format filters cannot override it.Log File
mpv.log
Sample Files
Sample file : https://www.mediafire.com/file/awsijs1e4ligx8l/sample.zip/file
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt.