Public bug reported:

FFMPEG hardware encoding fails on AMD hardware:

Passing -hwaccel vaapi flag as per command below:

Command used was:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128
-hwaccel_output_format vaapi -ss 15 -i input.mp4 -t 25 -c:v h264_vaapi
-global_quality 15 -c:a copy -map 0 output.mkv


Will silently fail and transcoding will be done on CPU silently when using on 
AMD GPU.

The only sign that something is wrong is this WARNING:

[hevc_vaapi @ 0x55f2ca003e80] Driver does not support some wanted packed
headers (wanted 0xd, found 0x1).

and for h264:

Press [q] to stop, [?] for help
[h264_vaapi @ 0x55762dd4de80] Driver does not support some wanted packed 
headers (wanted 0xd, found 0x1).


During transcode operation CPU usage is high, and GPU usage is zero. FFPROBE on 
OUTPUT.MKV reports that encoder used was software.

My syste:  Thinkpad T14s (AMD Ryzen7) Ubuntu Mate 21.04 (5.11)

bash $ sudo inxi -x -G
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir vendor: Lenovo 
driver: amdgpu v: kernel
           bus ID: 07:00.0
           Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus 
ID: 2-2:2
           Display: server: X.Org 1.20.11 driver: loaded: amdgpu,ati unloaded: 
fbdev,modesetting,vesa
           resolution: 1920x1080~60Hz
           OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.11.0-18-generic LLVM 
11.0.1) v: 4.6 Mesa 21.0.1
           direct render: Yes

** Affects: ffmpeg (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

- -hwaccel vaapi silently on AMD GPU  gives the following error:
+ FFMPEG hardware encoding fails on AMD hardware:
+ 
+ Passing -hwaccel vaapi flag as per command below:
+ 
+ Command used was:
+ 
+ ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128
+ -hwaccel_output_format vaapi -ss 15 -i input.mp4 -t 25 -c:v h264_vaapi
+ -global_quality 15 -c:a copy -map 0 output.mkv
+ 
+ 
+ Will silently fail and transcoding will be done on CPU silently when using on 
AMD GPU.
+ 
+ The only sign that something is wrong is this WARNING:
  
  [hevc_vaapi @ 0x55f2ca003e80] Driver does not support some wanted packed
  headers (wanted 0xd, found 0x1).
  
- and for h264
+ and for h264:
+ 
  Press [q] to stop, [?] for help
  [h264_vaapi @ 0x55762dd4de80] Driver does not support some wanted packed 
headers (wanted 0xd, found 0x1).
  
  
- Command used was:
+ During transcode operation CPU usage is high, and GPU usage is zero. FFPROBE 
on OUTPUT.MKV reports that encoder used was software.
  
- ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD129
- -hwaccel_output_format vaapi -ss 15 -i input.mp4 -t 15 -c:v hevc_vaapi
- -global_quality 15 -c:a copy -map 0 output.mkv
- 
- During transcode operation CPU usage is high, and GPU usage is zero.
- FFPROBE on OUTPUT reports that encoder used was software.
- 
- 
- system report:  Thinkpad T14 Ubuntu Mate 21.04 (5.11)
+ My syste:  Thinkpad T14s (AMD Ryzen7) Ubuntu Mate 21.04 (5.11)
  
  bash $ sudo inxi -x -G
- Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir vendor: Lenovo 
driver: amdgpu v: kernel 
-            bus ID: 07:00.0 
-            Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus 
ID: 2-2:2 
-            Display: server: X.Org 1.20.11 driver: loaded: amdgpu,ati 
unloaded: fbdev,modesetting,vesa 
-            resolution: 1920x1080~60Hz 
-            OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.11.0-18-generic LLVM 
11.0.1) v: 4.6 Mesa 21.0.1 
-            direct render: Yes
+ Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir vendor: Lenovo 
driver: amdgpu v: kernel
+            bus ID: 07:00.0
+            Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus 
ID: 2-2:2
+            Display: server: X.Org 1.20.11 driver: loaded: amdgpu,ati 
unloaded: fbdev,modesetting,vesa
+            resolution: 1920x1080~60Hz
+            OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.11.0-18-generic LLVM 
11.0.1) v: 4.6 Mesa 21.0.1
+            direct render: Yes

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1931045

Title:
  FFMPEG silently falls back to software encoding on AMD GPU

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ffmpeg/+bug/1931045/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to