Bug 29919 - shotcut vaapi hardware encoder detection and activation failure, patch indicated
Summary: shotcut vaapi hardware encoder detection and activation failure, patch indicated
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: https://ufile.io/kncqn0xi
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2022-01-21 02:52 CET by Josu
Modified: 2024-02-24 00:57 CET (History)
3 users (show)

See Also:
Source RPM: shotcut-21.12.24-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Josu 2022-01-21 02:52:25 CET
Description of problem: VAAPI encoding is unusable in Shotcut due to the use of ,connection_type=x11 argument when invoking ffmpeg and MLT. 
The proposed patch to source file src/docks/encodedock.cpp is shared in the URL above (remove ",connection_type=x11" from line 2073 and erase line 811). 

Version-Release number of selected component (if applicable): 21.12.24-1.mga9, other versions may be patched appart similarly as problem appears to be old (see https://github.com/mltframework/shotcut/issues/771). 


How reproducible: Open Shotcut, try to detect HW encoders using 'Use hardware decoder'-Configure in export tab. VAAPI not detected even if present. Ignore that and go on configuring export using h264_vaapi or other xxx_vaapi supported codec, once 'export archive' executed and listed in tasks list on the right, it will immediately fail.  


Steps to Reproduce:
1.Open shotcut and make a project to export it. 
2.Try to detect hardware encoders using export tab (under 'Export help' there is a 'Use hardware encoder' item and a button to make hw encoders detected.   
3.Try to export your project to a h264_vaapi mp4 file.
Comment 1 Lewis Smith 2022-01-21 19:42:29 CET
Thank you for the report, with its detailed explanation and the link to the necessary patch to cure the problem.

DavidG looks best to handle this, but CC'ing also ghibo who may be able to help.
Unsure whether 'MGA8TOO' applies. Without complaint, perhaps not.

CC: (none) => ghibomgx
Assignee: bugsquad => geiger.david68210
Summary: vaapi hardware encoder detection and activation failure => shotcut vaapi hardware encoder detection and activation failure, patch indicated

Comment 2 David GEIGER 2024-02-19 17:26:53 CET
Is this issue still valid with current mixxx-2.3.6-1.mga9 ?
Comment 3 David GEIGER 2024-02-19 17:28:27 CET
Ouppps sorry it is:

Is this issue still valid with current shotcut-21.12.24-4.mga9?
Comment 4 David GEIGER 2024-02-19 18:58:00 CET
Finally I updated shotcut to version 23.11.04 on mga9 and switch it to Qt6, and also mlt to 7.20.0 as it is required for shotcut.

Assigning to QA,

Packages in 9/Core/Updates_testing:
======================
shotcut-23.11.04-1.mga9

libmlt++7_7-7.20.0-1.mga9
libmlt-devel-7.20.0-1.mga9
libmlt7_7-7.20.0-1.mga9
lib64mlt++7_7-7.20.0-1.mga9
lib64mlt-devel-7.20.0-1.mga9
lib64mlt7_7-7.20.0-1.mga9
mlt-7.20.0-1.mga9
mlt-kdenlive-7.20.0-1.mga9
mlt-qt6-7.20.0-1.mga9
python3-mlt-7.20.0-1.mga9
ruby-mlt-7.20.0-1.mga9


From SRPMS:
shotcut-23.11.04-1.mga9.src.rpm
mlt-7.20.0-1.mga9.src.rpm

Version: Cauldron => 9
Hardware: x86_64 => All
Assignee: geiger.david68210 => qa-bugs

katnatek 2024-02-19 20:15:41 CET

Keywords: (none) => advisory

katnatek 2024-02-20 19:08:38 CET

Keywords: advisory => (none)

katnatek 2024-02-20 19:18:13 CET

Keywords: (none) => advisory

Comment 5 katnatek 2024-02-20 19:42:38 CET
Tested on real hardware mageia 9 x86_64

Update without issues
I can't test the reported issue don't know if I not set something or just this card  not can do vaapi, I really never use before this application

inxi -G
Graphics:
  Device-1: AMD Cape Verde XT [Radeon HD 7770/8760 / R7 250X] driver: amdgpu
    v: kernel
  Display: x11 server: X.org v: 1.21.1.8 with: Xwayland v: 22.1.9 driver: X:
    loaded: amdgpu unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: amdgpu
    resolution: 1360x768~60Hz
  API: OpenGL v: 4.6 Mesa 23.3.5 renderer: AMD Radeon HD 7700 Series
    (radeonsi verde LLVM 15.0.6 DRM 3.54 6.6.14-server-2.mga9)

vainfo 
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.16.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_16
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.16 (libva 2.16.0)
vainfo: Driver version: Mesa Gallium driver 23.3.5 for AMD Radeon HD 7700 Series (radeonsi, verde, LLVM 15.0.6, DRM 3.54, 6.6.14-server-2.mga9)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
Comment 6 katnatek 2024-02-23 04:30:06 CET
New test mageia 9 x86_64

From comment#0
How reproducible: Open Shotcut, try to detect HW encoders using 'Use hardware decoder'-Configure in export tab. VAAPI not detected even if present. 

I still get that

From comment#0
Ignore that and go on configuring export using h264_vaapi or other xxx_vaapi supported codec, once 'export archive' executed and listed in tasks list on the right, it will immediately fail.  

I use h264_vaapi and the conversion finish well
katnatek 2024-02-23 04:30:31 CET

Whiteboard: (none) => MGA9-64-OK

Comment 7 Thomas Andrews 2024-02-24 00:29:38 CET
Validating.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Comment 8 Mageia Robot 2024-02-24 00:57:11 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2024-0072.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.