-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--vf=vavpp - crashes when VAAPI decoding is not used #7350
Comments
I don't have debug symbols for anything lower level than mpv but it crashes in a
not sure if this is due to incorrect API usage (that AMD doesn't check) or simply an AMD bug. |
The log message before the crash makes no sense in the first place, I strongly suspect mpv logic error. |
Basically, instead of trusting the upload format, and picking the first sw format that has a desired upload format, trust the sw format. So now we pick the sw format first, and then select from the set of upload formats supported by it. This is probably more straightforward, and works around a crash with vaapi: mpv 8bit.mkv --vf=format=vaapi --gpu-hwdec-interop=all (Forces vaapi upload if hw decoding is not enabled.) Unfortunately, this still does not work, because vaapi, FFmpeg, the VO interop code, or all of them are doing something stupid. In particular, this picks the yuv420p sw format, which doesn't really exist despiter advertised (???????????????????????????????????????), and simply breaks. See: #7350
It turns out ffmpeg or vaapi returned nonsense metadata, which lead to the crash. mpv made a strange (but correct) choice with the nonsense metadata, which made things worse. I've worked it around with a vaapi whitelist. Someone who is into this kinky shit should probably take a look at ffmpeg/vaapi to fix the underlying cause, I sure as hell won't. I'*ll curse these projects instead. Untested with vavpp, I don't want to lock up my system. |
Thanks so far. Continuing as the bearer of bad news :( : mpv still occasionally crashes with that change when opening videos that are not decoded by VAAPI. If it doesn't crash, the rendered video frames are in gray tones.
|
Well this is the case that should work, and I can't reproduce it (I think). |
Pushed some more commits related to this, but didn't find/fix anything that could have caused this. The previous situation already looked like a ffmpeg and/or libva bugfest, so whatever, I'll just blame them and forget about this. |
Yeah, still unchanged. But be it so. :) |
Important Information
mpv-git-0.31.0_60_ga3ddddff3a-1
Arch recent custom
self-compiled mpv build
If known which version of mpv introduced the problem: nope
mesa-git 59d30fd4bc60f3562ca4c8247340389e97e494ae
RX 570 Polaris
Reproduction steps
Play a video codec that is not supported by the hardware (e.g. VP9 on Polaris) via
mpv --no-config --vf=vavpp=deint=auto:interlaced-only=yes
.Edit: Well, that way without
--hwdec=vaapi
specified, it crashes with anything.Expected behavior
It shouldn't crash. Perhaps it would do the trick by ignoring vavpp when VAAPI hardware decoding isn't used?
Background:
--hwdec=vaapi --vf=vavpp=deint=auto:interlaced-only=yes
seems to work nicely as auto deinterlacer and doesn't seem to cause issues when VAAPI decoding works.With this MR VAAPI deinterlacing btw. doesn't crash for me anymore on Polaris:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3341
It can't be evoked during playback though.
Actual behavior
mpv tries auto converting and crashes:
Can rebuild with debug symbols and provide crash dump if required.
Log file
output.txt
Sample files
Can likely be anything that isn't decoded via VAAPI.
The text was updated successfully, but these errors were encountered: