mpv
mpv copied to clipboard
gpu-next screenshot fails with ewa filter functions on SDR and Dolby Vision
Important Information
$ mpv --version
mpv v0.37.0-484-g665a472098 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v6.338.2
FFmpeg version: N-113989-gd34e9a81b1
FFmpeg library versions:
libavutil 58.40.100
libavcodec 60.41.100
libavformat 60.24.100
libswscale 7.6.100
libavfilter 9.17.100
libswresample 4.14.100
Arch Linux BSPWM 0.9.10-51-gaf3bd8b Locally compiled with mpv-full-gitAUR NVIDIA 3070 Ti, 550.54.14
Reproduction steps
- Choose an SDR or Dolby Vision
$VIDEO
-
mpv --no-config --vo=gpu-next --scale=ewa_lanczos $VIDEO mpv --no-config --vo=gpu-next --scale=ewa_lanczossharp $VIDEO mpv --no-config --vo=gpu-next --scale=ewa_lanczos4sharpest $VIDEO
- Use
screenshot
orscreenshot video
input mode commands. - Observe blank screenshots taken
📝 Note: Any non-EWA filter function works fine, but scale=ewa_lanczossharp
is used by both --profile=gpu-hq
& --profile=high-quality
which is how I first noticed the issue.
Expected behavior
Take a screenshot
with gpu-next
when using --scale=ewa_lanczossharp
.
Actual behavior
When viewing an SDR or Dolby Vision video with --vo=gpu-next
and taking a screenshot
with any ewa_*
filter function set as --scale
results in screenshots with the correct resolution, but completely black-filled.
Does not seem to occur with HDR10 video (common on YouTube).
The same result is seen with every --hwdec
option available to me, including --hwdec=no
.
I tried compiling without zimg (-Dzimg=disabled
), but got the same result.
📝 NOTE: The screenshot window
input mode command does work as expected, but screenshot video
has the same broken behavior as screenshot
.
Input Command | Format | chk |
---|---|---|
screenshot |
SDR | ❌ |
screenshot |
DV | ❌ |
screenshot |
HDR10 | ✅ |
screenshot video |
SDR | ❌ |
screenshot video |
DV | ❌ |
screenshot video |
HDR10 | ✅ |
screenshot window |
SDR | ✅ |
screenshot window |
DV | ✅ |
screenshot window |
HDR10 | ✅ |
Log file
Logs show an example of taking a screenshot
of an SDR video.
With zimg disabled:
Workaround
Using --screenshot-sw=yes
allows screenshot
input mode command to work with SDR and Dolby Vision video, however the screenshot window
result is stretched and distorted when using vo=gpu-next
with screen-shot-sw=yes
.
I did not do testing to see if the colors were accurate with this workaround and HDR video.