Closed marat569 closed 7 months ago
Here is the conf I run as a daily driver. I tried blank confs, confs with just vo=gpu-next, etc -- didn't work sadly
Can you post a log file?
Can you post a log file?
Here you go! I watched the video in the original post for a few seconds
the raw untonemapped video will be presented
What does that mean? Is your display simply not switching to HDR mode? Did you try enabling HDR for it in the Windows settings?
the raw untonemapped video will be presented
What does that mean? Is your display simply not switching to HDR mode? Did you try enabling HDR for it in the Windows settings?
Display is always in HDR Mode 100% of the time
The "raw untonemapped" image is there is well MPV is not doing any tonemapping, If the video has 5000 nit peaks, you'll get a 5000 nit output (clipped my the display ofc). target-peak=1000 (or whatever value you set) fixs this by tonemapping 5000 to 1000 (or w/e value you set)
You can see when tonemapping is happening via shift I to open the OSD, and "2"; you'll see tonemapping XXXX -> YYYY -- this sadly does not happen in videos with mpv youtube.com/blabla
In this image, MPV is tonemapping to 1000 nits, but its not a streamed video; but a local video file; so everything works https://i.imgur.com/DwgJiBc.jpeg
I can't reproduce the issue with the youtube video:
mpv --no-config --vo=gpu-next --target-trc=pq --target-colorspace-hint --target-peak=1000 https://youtu.be/72_rYwzLhjk
The statistics show tonemap XXXX -> 1000 nits.
I can't reproduce the issue with the youtube video:
mpv --no-config --vo=gpu-next --target-trc=pq --target-colorspace-hint --target-peak=1000 https://youtu.be/72_rYwzLhjk
The statistics show tonemap XXXX -> 1000 nits.
I just pasted that into my run bar, doesn't for me -- let me try to add a log
I even took a jxr, and the output is 2000 nits+
I can't reproduce the issue with the youtube video:
mpv --no-config --vo=gpu-next --target-trc=pq --target-colorspace-hint --target-peak=1000 https://youtu.be/72_rYwzLhjk
The statistics show tonemap XXXX -> 1000 nits.
I ran this, and target-peak is not getting applied. I'm running update.bat constnatly, so my version is new as you can see from the log
mpv --no-config --vo=gpu-next --target-trc=pq --target-colorspace-hint --target-peak=1000 https://youtu.be/72_rYwzLhjk --log-file=output.txt"
(just added a log file to your command)
This video max_luminance
is 1000.000000, so this is the expected behavior. You can try --target-peak=999
This video
max_luminance
is 1000.000000, so this is the expected behavior. You can try--target-peak=999
I tried 500 for fun, and yea its tonemapping. Thank you! 999 is also a solid work around.
Can we get a way to force target-peak?
Because a lot of videos on youtube set a max_luminance of 1000; but they still output a 10,000 nit (full hdr10 signal) image -- or in this video's case, up to 3000 nits.
Here is an example of such a video: mpv https://youtu.be/BditFs3VR9c
-- even though the peak is set to 1000, the output is 10k nits.
Can we get a way to force target-peak?
hdr-compute-peak=yes
But target-peak
can't be the same as max_luminance
, for example, target-peak
can be 999 or 1001 when max_luminance
is 1000.
Can we get a way to force target-peak?
hdr-compute-peak=yes
Buttarget-peak
can't be the same asmax_luminance
, for example,target-peak
can be 999 or 1001 whenmax_luminance
is 1000.
Trusting max_luminance
is a good idea on paper for something like a bluray, because that will usually have it set proper; but as we've seen youtube videos set meme static metadata. 999 isnt really far off from 1000; so its not a big deal.
Also I don't know if I'm using hdr-compute-peak
wrong. I tried both yes and no with target-peak 1000; and it doesnt tonemap.
I was asking for a setting for where I can set target-peak=1000
and regardless of what the max_luminance
is set to, it will still respect my target-peak and tonemap if the frame has a MaxCLL over 1000 in this case
Also I don't know if I'm using
hdr-compute-peak
wrong. I tried both yes and no with target-peak 1000; and it doesnt tonemap.
I don't know if this is expected behavior or a bug, but when target-peak
same as max_luminance
, tone-mapping is always disabled anyway, even if peak detection gets a completely different result than max_luminance
. 1001/999 is an ugly hack.
Also I don't know if I'm using
hdr-compute-peak
wrong. I tried both yes and no with target-peak 1000; and it doesnt tonemap.I don't know if this is expected behavior or a bug, but when
target-peak
same asmax_luminance
, tone-mapping is always disabled anyway, even if peak detection gets a completely different result thanmax_luminance
. 1001/999 is an ugly hack.
Right, but its something we need, because if you look at this video for example -- https://youtu.be/BditFs3VR9c
max_luminance
1000, but you get fed a juicy 10k nit image
I don't know if youtube is the issue when it comes to shipping bad static metadata or the content creator; but a ugly hack is better than watching full screen clipping
This should not be an issue with hdr-compute-peak
, you should make sure it does get enabled.
It works for me.
I tried hdr-compute-peak=no
(and yes) again
So in the OSD (shift + i) I can see that the MaxCLL is not being calculated
But with target-peak=1000
, I still don't get any tone mapping in youtube videos.
I feel like youtube videos might need a workaround.
I've tried dozens of different videos since starting this issue, and the HDR metadata youtube sends out is "wrong".
https://code.videolan.org/videolan/libplacebo/-/merge_requests/653
Awesome, thank you so much!
@kasper93
I'm sorry to bother ya'll after you guys fixed the issue, but how long does it take for a mpv update after libplacebo gets approved?
I never worried about MPV versions before since I use the windows downstream release with updater.bat that just grabs new mpv.exe/mpv.conf based on my repo confs (weekly/nightly/etc)
If you are using shinchiro's build, next one will have it. zhongfly's build should have it already https://github.com/zhongfly/mpv-winbuild/releases/tag/2024-03-08-414ddbd
pretty sure I use shinchiro's
thank you!
MPV Version: mpv-x86_64-20240225-git-74b4c3c
Windows 11 23h2 [Version 10.0.22631.3155]
Nvidia GPU
Update: Andarwinux discovered that if a video's
max_luminance
is less than or equal to yourtarget-peak
, MPV will not engage in tonemapping.The issue there is a lot of videos might set
max_luminance
to 1000, but output a 10,000 nit image. A good example is this one:mpv https://youtu.be/BditFs3VR9c
Even though it has amax_luminance
of 1000 in the hdr metadata, the video outputs a 10,000 nit image.In my opinion we need a way to force mpv to tonemap to our desired target peak regardless of what the hdr metadata says.
While it may be accurate on blurays, youtube video metadata is a meme.
so the issue is simple, if you run
mpv https://youtu.be/72_rYwzLhjk
for example withvo=gpu-next
andtarget-colorspace-hint=yes
--target-peak
will NOT activate; and the video will not get tonemapped; the raw untonemapped video will be presentedI tried streaming different sites via
mpv website.com/video
and anything that gets streamed into mpv does not get target peak appliedI made a little custom if profile in my conf for youtube videos to try and force target-peak, and even a hotkey that forces it -- nothing
if you set
target-colorspace-hint=no
-- it will tonemap; but the video wont be in HDR; you'll get a SDR imageI tried a wide range of settings, and this is what I've came to
Sorry if the issue does not have every single requested detail, if you want any more info feel free to ask -- I'll reply asap with any additional info -- please don't just instantly close the issue :sadge:
Thank you!