Bug 6294

Summary: VLC does not offer VA-API HW acceleration
Product: Fedora Reporter: Julian <fedora_bugreports>
Component: vlcAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED FIXED    
Severity: normal CC: leigh123linux, piotrdrag, stefanrin
Priority: P1    
Version: f36   
Hardware: x86_64   
OS: GNU/Linux   
URL: https://code.videolan.org/videolan/vlc/-/issues/26772
namespace:
Attachments: Only VDPAU in HW decoder list.
Package info with version info of VLC in the background
Output of vainfo
compat-ffmpeg4 patch

Description Julian 2022-05-11 10:32:13 CEST
Created attachment 2395 [details]
Only VDPAU in HW decoder list.

In VLC installed via rpmfusion-free the list of HW decoder options is very limited.

The flatpack version I installed for comparison does include many more options.

VA-API is successfully used on the system in firefox and mv.

$ dnf info vlc-core-1:3.0.17.2-1.fc36.x86_64
Letzte Prüfung auf abgelaufene Metadaten: vor 0:09:06 am Mi 11 Mai 2022 10:15:08 CEST.
Installierte Pakete
Name         : vlc-core
Epoch        : 1
Version      : 3.0.17.2
Release      : 1.fc36
Architektur  : x86_64
Größe        : 51 M
Quelle       : vlc-3.0.17.2-1.fc36.src.rpm
Paketquelle  : @System
Aus Paketque : rpmfusion-free
Zusammenfass : VLC media player core
URL          : https://www.videolan.org
Lizenz       : GPLv2+
Beschreibung : VLC media player core components

$ vainfo 
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.14.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointEncSlice
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointEncSlice
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain422_12         : VAEntrypointEncSlice
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP
Comment 1 Julian 2022-05-11 10:33:44 CEST
Created attachment 2396 [details]
Package info with version info of VLC in the background
Comment 2 Julian 2022-05-11 10:34:48 CEST
Created attachment 2397 [details]
Output of vainfo
Comment 3 Nicolas Chauvet 2022-05-11 12:08:04 CEST
Right, this is a known issue because we plan to use the system ffmpeg5 whereas VA-API support have changed a lot, so support have been dropped upstream. (or we would need to build vlc with ffmpeg4).


This is unlikely to be fixed upstream until vlc-4.0
Please use mpv for hw accel video (if it really worth it).

https://rpmfusion.org/CommonBugs
Comment 4 Julian 2022-05-11 13:14:01 CEST
(In reply to Nicolas Chauvet from comment #3)
> Right, this is a known issue because we plan to use the system ffmpeg5
> whereas VA-API support have changed a lot, so support have been dropped
> upstream. (or we would need to build vlc with ffmpeg4).
> 
> 
> This is unlikely to be fixed upstream until vlc-4.0
> Please use mpv for hw accel video (if it really worth it).
> 
> https://rpmfusion.org/CommonBugs

Understood.

Thank you for the fast response.

Indeed, I do use mpv for now. Currently, the VLC flatpak can also give VA-API support as a workaround.

I searched a bit for this but did not find anything about this in any forum, so I guess it is still good to have this info here.

As a result, I would mark the "bug" as RESOLVED.

Thank you again for clarifying it.

Have a great day!
Comment 5 leigh scott 2022-05-11 13:25:53 CEST
Created attachment 2398 [details]
compat-ffmpeg4 patch

(In reply to Nicolas Chauvet from comment #3)
> upstream. (or we would need to build vlc with ffmpeg4).
Comment 6 Nicolas Chauvet 2022-05-11 14:22:10 CEST
We could fixed it that way, But I used to think that another software was linking to libvlc.so.5 (or libvlccore.so.9) that was also using ffmpeg-libs. So we need to use the same ffmpeg version there also.



LANG=C sudo dnf repoquery --whatrequires libvlc.so.5\*                                                                               
kaffeine-0:2.0.18-6.fc35.x86_64
medialibrary-0:0.6.0-4.fc35.x86_64
phonon-qt5-backend-vlc-0:0.11.1-4.fc35.x86_64
phonon-qt5-backend-vlc-0:0.11.3-1.fc35.x86_64
vlc-devel-1:3.0.16-5.fc35.x86_64
vlc-devel-1:3.0.17.2-1.fc35.x86_64

LANG=C sudo dnf repoquery --whatrequires libvlccore.so.9\*                                                                   
phonon-qt5-backend-vlc-0:0.11.1-4.fc35.x86_64
phonon-qt5-backend-vlc-0:0.11.3-1.fc35.x86_64
vlc-1:3.0.16-5.fc35.x86_64
vlc-1:3.0.17.2-1.fc35.x86_64
vlc-bittorrent-0:2.13-2.fc35.x86_64
vlc-bittorrent-0:2.14-1.fc35.x86_64
vlc-devel-1:3.0.16-5.fc35.x86_64
vlc-devel-1:3.0.17.2-1.fc35.x86_64
vlc-extras-1:3.0.16-5.fc35.x86_64
vlc-extras-1:3.0.17.2-1.fc35.x86_64

(so far, theses are not using ffmpeg -libs directly).


Only obs-studio uses vlc-devel without any runtime dependencies on the libraries (dlopen used ?).
Comment 7 Nicolas Chauvet 2022-05-11 15:17:41 CEST
*** Bug 6296 has been marked as a duplicate of this bug. ***
Comment 8 Julian 2022-05-11 15:40:10 CEST
Since the discussion continues, I will re-open the ticket again.

The problem itself is upstream: https://code.videolan.org/videolan/vlc/-/issues/26772

However, there are solutions possible, seemingly even without linking to ffmpeg4.
Comment 9 Nicolas Chauvet 2022-05-15 16:53:19 CEST
Okay, I've modified your patch so that it will applies to el9 also...


Let's go with this as I don't think we have conflicting ffmpeg in dependencies...