Hope to change subtitle peak luminosity throught `--hdr-compute-peak` when playing pq transfer video
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Before requesting a new feature make sure it hasn't been requested yet.
https://github.com/mpv-player/mpv/labels/meta%3Afeature-request
Expected behavior of the wanted feature
When I played HDR videos with pq transfer function(and the windows system entered HDR mode), I found that the subtitles would be first converted to linear light space and then mapped to pq using min[203, target-trc] as the reference peak luminosity. I know that this behaviour reference the standard bt.2390. But the constant peak may cause a few problems. Because the ass file was not designed for HDR playback at first, so the style brightness value would be constant from beginning to end. This may cause the subtitle looks too bright in dark scene or too sombre in shiny scene. And in Aegisub, it is too troublesome to specify a style for each scene. Moreover, we can't make subtitle brighter than 203nit even though it looks sombre.
So I hope to add an option that the reference peak luminosity of subtitle rendering can be obtain from --hdr-compute-peak, so it brightness will vary automaticlly in the different scene.
Alternative behavior of the wanted feature
Log file
Even if you think it's not necessary at first, it might help us later to find
possible issues. Make a log file made with -v -v or --log-file=output.txt, paste
it to https://0x0.st/ or attach it to the github issue, and replace this text
with a link to it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing --hdr-compute-peak option and the subtitle rendering path for PQ-transfer video. Compare the current fixed reference peak behavior with the requested scene-dependent behavior, including ASS subtitle styles and BT.2390 mapping. Done means the reference peak can follow the computed HDR peak without breaking subtitle rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100