Hardware decoding using VAAPI don't work

*nix specific usage questions
Rayzeq
New Cone
New Cone
Posts: 2
Joined: 24 Apr 2023 16:39
Operating System: Linux

Hardware decoding using VAAPI don't work

Postby Rayzeq » 24 Apr 2023 17:22

So, I recently tried to play 4K videos, which led me to discover that vlc is doing CPU decoding instead of using VAAPI.
Here is my vlc version: VLC media player 3.0.18 Vetinari (revision 3.0.13-8-g41878ff4f2)

Hardware decoding works with mpv, and using FFmpeg like this:

Code: Select all

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i video.mp4 -vcodec rawvideo -acodec copy -f matroska - | ffplay -i -
I can confirm they're both using VAAPI using intel_gpu_top.

FFmpeg show a h264_vaapi encoder (my video is H.264), but no decoder with the same name. I've read that it's normal as long as it shows vaapi when I do ffmpeg -hwaccels, which it does.

Here's the logs (I, hopefully, kept only related logs):

Code: Select all

avcodec debug: available hardware decoder output format 98 (vdpau) avcodec debug: available hardware decoder output format 117 (cuda) avcodec debug: available hardware decoder output format 44 (vaapi) avcodec debug: available software decoder output format 0 (yuv420p) avcodec debug: trying format vaapi main debug: Buffering 25% main debug: Buffering 50% main debug: Buffering 75% main debug: Buffering 100% main debug: Stream buffering done (1250 ms in 50 ms) main debug: looking for video converter module matching "any": 23 candidates swscale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) main debug: using video converter module "swscale" main debug: looking for video converter module matching "any": 23 candidates yuvp debug: YUVP to YUVA converter main debug: using video converter module "yuvp" main debug: Deinterlacing available main debug: deinterlace -1, mode auto, is_needed 0 main debug: looking for vout window module matching "qt,any": 6 candidates qt debug: requesting video window... main debug: using vout window module "qt" main debug: looking for inhibit module matching "any": 2 candidates dbus_screensaver debug: found service org.freedesktop.ScreenSaver main debug: using inhibit module "dbus_screensaver" main debug: Opening vout display wrapper main debug: looking for vout display module matching "any": 14 candidates main debug: resized to 3840x1920 main debug: VoutDisplayEvent 'resize' 3840x1920 main debug: looking for opengl module matching "any": 3 candidates main debug: resized to 1366x634 main debug: VoutDisplayEvent 'resize' 1366x634 egl_x11 debug: EGL version 1.5 by Mesa Project egl_x11 debug: extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_CHROMIUM_sync_control EGL_ANGLE_sync_control_rate EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_swap_buffers_with_damage EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_swap_buffers_with_damage EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_NOK_texture_from_pixmap EGL_WL_bind_wayland_display main debug: using opengl module "egl_x11" gl info: Initialized libplacebo v4.208.0 (API v208) main debug: looking for glconv module matching "any": 4 candidates main debug: using glconv module "glconv_vaapi_x11" main debug: using vout display module "gl" main debug: original format sz 3840x1920, of (0,0), vsz 3840x1920, 4cc VAOP, sar 1:1, msk r0x0 g0x0 b0x0 main debug: resized to 1366x634 main debug: VoutDisplayEvent 'resize' 1366x634 main debug: looking for hw decoder module matching "any": 1 candidates main debug: no hw decoder modules matched avcodec debug: trying format vdpau
It then also fails with VDPAU (which is expected since I'm on an hybrid graphics laptop).

In "Hardware decoding" I can only select automatic, vdpau, or disabled, but not VAAPI.
I have the latest libavcodec-extra59 from Ubuntu 23.04, but not libavcodec59 as it seem to be incompatible with libavcodec-extra.

Does someone have an idea of why it doesn't work ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Hardware decoding using VAAPI don't work

Postby Rémi Denis-Courmont » 24 Apr 2023 18:39

Your VLC package lacks VA-API support. Note that Ubuntu 23.04 has indeed disabled VA-API in their VLC package.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Rayzeq
New Cone
New Cone
Posts: 2
Joined: 24 Apr 2023 16:39
Operating System: Linux

Re: Hardware decoding using VAAPI don't work

Postby Rayzeq » 24 Apr 2023 19:43

Ok that make sense, but why did they disabled VAAPI tho ?
It seems like a bad idea given that (I think) many people have an intel integrated gpu.
Anyway, I got it working using the vlc flatpak and manually selecting VAAPI.
Thanks for you help !

timattrn
New Cone
New Cone
Posts: 4
Joined: 01 Feb 2021 01:48

Re: Hardware decoding using VAAPI don't work

Postby timattrn » 09 Jun 2023 12:48

do we know why it was disabled? I just reported a bug on launchpad, should have checked here first.
I will try the flatpak

timattrn
New Cone
New Cone
Posts: 4
Joined: 01 Feb 2021 01:48

Re: Hardware decoding using VAAPI don't work

Postby timattrn » 09 Jun 2023 12:50

this is in Ubuntu changelog:

vlc (3.0.17.4-4) unstable; urgency=medium

* debian/control: Bump Standards-Version
* debian/: Disable libva support
vlc's libva support and ffmpeg 5.0 are not compatible.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 15 guests