mpv-player / mpv

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

Screen goes black on when using inverse-tonemapping in fullscreen #14890

Open steo86 opened 1 month ago

steo86 commented 1 month ago

mpv Information

mpv 0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Apr 20 2024 00:22:30
libplacebo version: v7.349.0 (v6.338.0-124-gd0eb997-dirty)
FFmpeg version: N-114897-gbba996d6c
FFmpeg library versions:
   libavutil       59.15.100
   libavcodec      61.5.103
   libavformat     61.3.100
   libswscale      8.2.100
   libavfilter     10.2.101
   libswresample   5.2.100

Other Information

- Windows version: Windows 10 22H2
- GPU model, driver and version: Nvidia GTX 970 - Nvidia driver 580.94

Reproduction Steps

I am trying to use the inverse-tonemapping for SD-Material. Therefor I am using this conf for testing:

`gpu-api=d3d11 hwdec=auto-copy vo=gpu-next profile=gpu-hq video-output-levels=full

[InverseToneMap] profile-restore=copy target-trc=pq target-prim=bt.709 target-peak=400 tone-mapping=spline inverse-tone-mapping=yes target-colorspace-hint=yes hdr-compute-peak=no`

in the input.conf I have defined F3/F4 to activte the inverse-tonemapping and deactivte it:

a cycle audio s cycle sub I script-binding stats/display-stats-toggle x quit X quit F3 show-text "InverseToneMap"; apply-profile InverseToneMap F4 show-text "Disable InverseToneMap"; apply-profile InverseToneMap restore

This is all working fine as long as the mpv is running in window-mode. When I activate inverse tonemapping in window mode (F3) there is a clear difference in colors. When I switch to fullscreen mode and I activate inverse-tonemapping (F3) the picture in mpv gets dark. You can see some contours of the video. So it is still running but shuch dark that you can hardly decide if video is running or not. When disabling again with F4 in fullscreen picture comes back (but then without inverse-tonemapping).

I have attached a logfile. Just search in the log for "IRun command: apply-profile, flags=73, args=[name="InverseToneMap", mode="apply"]" That was the point when I enabled Inverse-Tonemapping with F3 in fullscreen-mode and it went black

Expected Behavior

Get inverse-tonemapping working in fullscreen as well.

Actual Behavior

only working in window mode

Log File

output.txt

Sample Files

No response

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

kasper93 commented 1 month ago

I see you have some change_refresh script. Does it also happen without it?

inverse-tone-mapping=yes
target-colorspace-hint=yes

will output hdr, possibly signaling it to the display, it might be that your screen doesn't work correctly in HDR mode at certain resolution.

steo86 commented 1 month ago

disabling all scripts did not make any difference. In generel the Screen is working fine (Epson LS12000) with HDR-Stuff from other sources. When I change "target-colorspace-hint" to "no" I can apply with F3 but then colors are completely washed out. So more or less doing the opposite as when it´s enabled. when enable colors are getting pushed as it should but only working in window mode as described

steo86 commented 1 month ago

it´s really strange. I have recorded it via my mobile phone and uploaded here.

https://github.com/user-attachments/assets/5317fec5-88d6-4e24-b718-94397785b7ce

The video starts with disable InverseTonemapping in fullscreen. At 0:00:02 I activated InverseTonemapping in fullscreen --> screen goes dark at 0:00:04 I disabled InverseTonemapping in Fullscreen --> screen is back At 0:00:07 I activated InverseTonemapping in fullscreen --> screen goes dark At 0:00:11 I pressed "alt" to open taskbar (with activated inverse tonemapping) which causes mpv to go in window mode --> screen is back with inverse tonemapping activated.

steo86 commented 1 month ago

error does only exist when using

vo=gpu-next gpu-api=d3d11

when using

gpu-api=vulkan or gpu-api=opengl

problem does not exist.

But then inverse-tonemapping is not working anymore. Seems that inverse-tonemapping is only working correctly with gpu-api=d3d11

steo86 commented 1 month ago

no one an idea how and where to start troubleshooting?