Open runlevel5 opened 1 year ago
I am totally unsure if this is a bug or not so I resolve to ask a question instead.
The required information to tell whether this is a bug is however contained inside inside the bug report template. Please fill it out.
We still need a log file, for example.
The required information to tell whether this is a bug is however contained inside inside the bug report template. Please fill it out.
Thanks. I will follow up on that now
@Traneptora @sfan5 https://gist.github.com/runlevel5/403ecaa87dc4bff9e88f6ff35c1fa16e
You appear to be toggling hwdec mid playback, does this still happen if you use vaapi or no hwdec from the beginning (without toggling)?
You appear to be toggling hwdec mid playback, does this still happen if you use vaapi or no hwdec from the beginning (without toggling)?
I do not face this issue if I turn on hwdec
from the beginning
Got this on Windows 11 with mpv-git from scoop repo.
mpv v0.37.0-561-g3afcaeb7 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
built on Mar 17 2024 00:11:00
libplacebo version: v7.349.0 (v6.338.0-118-g4fdb9c0-dirty)
FFmpeg version: N-114224-gde2fb43e7
FFmpeg library versions:
libavutil 59.2.100
libavcodec 61.1.101
libavformat 61.0.100
libswscale 8.0.100
libavfilter 10.0.100
libswresample 5.0.100```
I got autoprofile in my config, looks like that
[AV1]
#profile-cond=p["video-format"]=="av1"
gpu-api=d3d11
hwdec=d3d11va
interpolation=no
video-sync=desync
If I load it manually - it works just fine, but when it loaded automatically - it get same error. You mention switching hwdec on a fly and yes, I have this one, my config is by default:
vo=gpu-next
hwdec=vulkan
gpu-api=vulkan
My guess that mpv doesn't do api and hwdec switching on a fly well enough or it doesn't load autoprofile early, so this problem occurs, because manually profile works just fine. Hope this helps.
I encountered this issue on Android. Here it leads to A/V desync which eventually corrects itself after 10-15 seconds and decoding also starts working normally. Doesn't happen with every file and cannot be reproduced 100% of the time. Reproducibility is still high for files that it does happen on though. When it happens, such spam is seen from libdav1d for some period of time, eventually stops and starts swdec normally:
[15301.638][v][vd] Using software decoding.
[15301.638][v][vd] Detected 8 logical cores.
[15301.638][v][vd] Requesting 9 threads for decoding.
[15301.638][d][ffmpeg/video] libdav1d: libdav1d 1.4.2-15-g2355eeb
[15301.638][d][mkv] stream 1: resize index to 256
[15301.662][e][ffmpeg/video] libdav1d: Error parsing OBU data
[15301.662][w][vd] Error while decoding frame!
[15301.662][e][ffmpeg/video] libdav1d: Error parsing OBU data
[15301.662][w][vd] Error while decoding frame!
[15301.662][e][ffmpeg/video] libdav1d: Error parsing OBU data
[15301.662][w][vd] Error while decoding frame!
[15301.662][e][ffmpeg/video] libdav1d: Error parsing OBU data
[15301.662][w][vd] Error while decoding frame!
[15301.664][d][mkv] stream 2: resize index to 256
[15301.671][v][vd] Using software decoding.
// No more spam after this point
The way to trigger this is to make mpv kick it into av1 swdec using libdav1d from an auto profile. Something like this should trigger it if your HW doesn't have av1 hwdec
hwdec=no
[AV1]
profile-cond=p['video-format']=='av1'
# Make mpv kick it into swdec again
hwdec=auto
Reminder, it doesn't happen if you only had hwdec=auto
or hwdec=no
in your config file for example. Only if you do as such from a profile.
I tried not whitelisting av1 for hw decode when setting the profile but no dice.
Info
When I play an AV1 encoded video clip with vaapi, I got following error in the mpv output:
Full log: https://gist.github.com/runlevel5/403ecaa87dc4bff9e88f6ff35c1fa16e
I am totally unsure if this is a bug or not so I resolve to ask a question instead.