Repository navigation
Vulkan Video Decoding: Usage Guide and FAQ #13909
Replies: 250 comments 95 replies
|
AMD on Windows appears to be 5000/6000 series according to https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-11-2-vlk-video-code-decode (possibly 7000 works?). It doesn't work on Polaris: |
|
Reliably crashes driver for me with this sample: https://0x0.st/HbHJ.mkv |
|
Sounds like you probably need to file a mesa issue for that - and even if it was an mpv issue, please open a separate one. This FAQ isn't the place to report it. |
|
@aufkrawall AMD currently needs https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 to avoid crashes, which also fixes quite a lot of bugs |
what does this error mean, my device has amd and i used the following config |
I don't know if that specific driver is required, they may have been included in 23.2.1 where they added other extensions, the driver notes aren't clear. 7000 series wasn't launched when the 22-11-2 Vulkan video drivers were released so that driver doesn't officially support them. If they did include the video extensions in newer drivers then they may support 7000 series but someone with those GPUs will need to test. |
|
Yeah, I've reported to nvidia months ago that their descriptor buffer implementation is broken, but they haven't fixed it yet. |
Github claims you attached an audio-only file... |
|
That file is also broken on anv, it's glitchy and the decode is very slow while utilizing 100% of Render/3D engine. |
It's an HEVC file. My experience on ANV is that any HEVC playback pegs the GPU at 100% |
|
Also: This is a highly questionable sample. |
|
Will this work with hasvk in the future? I tried using it through wine (I dont want to have to compile everything) and got this error |
|
NVIDIA 1650 Super, Tested on windows with: mpv --vo=gpu-next --gpu-api=vulkan --hwdec=vulkan --gpu-context=winvk This video has problem: https://4kmedia.org/sony-whale-in-tonga-hdr-uhd-4k-demo/ |
|
for fedora, you need to edit mesa.spec and rebuild with codecs enabled https://themaister.net/blog/2023/01/05/vulkan-video-shenanigans-ffmpeg-radv-integration-experiments/ https://forum.endeavouros.com/t/compiling-mesa-22-2-with-codec-support-the-easy-way/30390 |
|
Hi there, i have an AMD GPU (RADV) that is builtin into my Ryzen 7 5700G and i noticed that mpv now uses waylandvk by default on my system where it used just wayland as context until recently. I noticed it, because it is horribly slow, its barely usable. Using --profile=best causes most of the frames to be dropped and using profile=fast gets me through with 90% GPU usage and a few frame drops here and there. For comparison with --gpu-context=wayland, profile=fast uses like 5~10% GPU and profile=best works without frame drops at ~90% GPU usage. So i put gpu-context=wayland into my mpv.conf now but i am wondering what causes this insane frame drop. Its a FullHD Video i watch on a 4K Screen (so it is using the upscaling), H.264 (with vaapi decoding) and a pretty low bit-rate. Like 3mbps or so (YouTube Quality). So not sure what exactly is the issue here, but waylandvk is not usable for me, at all. |
|
Could someone that knows a bit more about this than me figure out if AMD GPUs still require RADV_PERFTEST? I do not know where to look at to find that information. According to another comment in this discussion it depends on a certain Mesa version, and also on the VCN version. So it would be nice to know which Mesa versions with which VCN versions don't require the flag to work. The Arch Wiki does not mention RADV_PERFTEST itself as a requirement to get Vulkan Video Decoding to work, only Mesa 25.1 or higher. (On the KDE page under the HDR section) |
|
does glsl shaders like KrigBilateral and SSimDownscaler support in vulkan backend or i should keep using openGL to use them |
|
I'm trying to use vulkan video instead of nvdec due to it being inefficient, forcing the GPU into a high power profile.
Specs are: 5070ti, Version: 570.144, Arch Linux, Wayland, Plasma, Open GPU Kernel Modules. Hope someone can help, unsure if this is a driver thing with the new 50 series..
|
|
ANV_VIDEO_DECODE=1 to ANV_DEBUG=video-decode |
|
Khronos Announces Vulkan Video Decode VP9 Extension |
|
I can't get vulkan decode working on my 9070. |
|
I'm on Intel (i3 1215u iGPU)+Arch Linux with current Mesa. Vulkan decoding works, but fast forwarding/skipping any H265 file makes it crash with this error: H264 files work without issues. |
|
I was wondering what else is needed for this to work with virtio-gpu via venus driver |
|
For reference my RX 570 decodes h264 5 times slower under vulkan than vaapi, on CachyOS. |
|
On an Intel UHD 620 I'm getting a weird error: |
|
For AMD users on linux there will be change in env variable. https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40646 |
|
When it works, it works quite good, but getting this too often recently: dmesg shows:
Latest Arch (updated 2 days ago) |
|
Ever since I switched from the proprietary driver to Nouveau/NVK for my Nvidia card, Vulkan Video no longer works with my Intel iGPU and mpv. I had been following the Arch Wiki instructions before, and as I said, it worked perfectly. This error message appears: here is the vulkaninfo: These are my mpv.conf settings: |
|
Thanks Ilyyr for replying. Oh, i did not know you can already utilize the Nvidia Card with NVK for Vulkan Video? I actually just wanted to use my Intel card for that as before. So i tried while adding the For now i have only enabled Besides, |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Vulkan Video Decoding: Usage Guide and FAQ
On the 28th of May, we reached the significant milestone of finally merging all the required functionality into ffmpeg, libplacebo, and mpv to do end-to-end Vulkan video decoding and presentation. Although the functionality is now all there, we still have a complex landscape in terms of what is supported on what hardware and with what drivers. This document attempts to lay out all the requirements and limitations, so you have a chance of successfully using the feature.
Why should I even care about Vulkan video decoding?
It's a fair question. Right now, the actual functionality you gain access to is not terribly different from what you would get with existing video decoding APIs that ffmpeg and mpv already support. However, Vulkan video decoding has the potential to be a credible cross-vendor, cross-platform API that is well supported, and can work efficiently with Vulkan based filtering and post-processing. In the short term, there will be rough edges, and a narrower set of supported codecs (don't hold your breath for mpeg2 and vp8), but in the future, it will hopefully be the most performant and capable way to do hardware decoding and processing.
Software Requirements
We have finally reached the point where all the required components have made official releases. Ensure you are running with the following releases or newer:
These requirements mean you will likely have to compile everything for yourself (especially on Linux), but Shinchiro's windows builds appear to be functional.
Hardware and Driver Requirements
Usage
The basic command line arguments:
Depending on your system configuration, you may additionally need to force the right
gpu-context:--gpu-context=winvk--gpu-context=x11vk--gpu-context=waylandvkCapabilities
ANV_DEBUG=video-decodein your environment to expose video decodingRADV_PERFTEST=video_decodein your environment to expose video decodingAll reactions