[Cin] System ffmpeg Vulkan video transcoding fails - while benchmarking works
Terje Hanssen
terjejhanssen at gmail.com
Sat Apr 26 19:27:35 CEST 2025
I have yet to get my system ffmpeg vulkan video transcoding to work on
my machines, while benchmarking works.
Therefore I hope get verified if my code line is correct, and how to fix
possible syntax errors.
-----------------
Dell XPS 13-9370 ultrabook
ffmpeg version 7.1.1 built with gcc 14 (SUSE Linux)
inxi -CGSz
System:
Kernel: 6.12.24-1.0.2.sr20250402-longterm arch: x86_64 bits: 64
Desktop: GNOME v: 48.0 Distro: openSUSE Tumbleweed-Slowroll 20250402
CPU:
Info: quad core model: Intel Core i7-8550U bits: 64 type: MT MCP cache:
L2: 1024 KiB
Speed (MHz): avg: 900 min/max: 400/4000 cores: 1: 900 2: 900 3: 900
4: 900
5: 900 6: 900 7: 900 8: 900
Graphics:
Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
Device-2: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB
Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.6
compositor: gnome-shell driver: gpu: i915 resolution: 3840x2160~60Hz
API: OpenGL v: 4.6 vendor: intel mesa v: 25.0.3 renderer: Mesa Intel UHD
Graphics 620 (KBL GT2)
API: Vulkan v: 1.4.309 drivers: N/A surfaces: xcb,xlib,wayland
API: EGL Message: EGL data requires eglinfo. Check --recommends.
Info: Tools: api: glxinfo,vulkaninfo x11: xprop,xrandr
=========================
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json
export ANV_VIDEO_DECODE=1
export ANV_VIDEO_ENCODE=1
Transcoding fails:
ffmpeg -hide_banner -init_hw_device vulkan=vk:0 -filter_hw_device vk -i
hdv09_04_h264_qsv_8b420.mp4 -c:v hevc_vulkan test_hevc.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_h264_qsv_8b420.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.1.100
Duration: 00:03:58.88, start: 0.000000, bitrate: 7671 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
yuvj420p(pc, smpte170m/unknown/unknown, progressive), 1440x1080 [SAR 4:3
DAR 16:9], 7536 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 129 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_vulkan))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter
'Parsed_null_0' and the filter 'auto_scale_0'
[vf#0:0 @ 0x561e923dd540] Error reinitializing filters!
[vf#0:0 @ 0x561e923dd540] Task finished with error code: -38 (Function
not implemented)
[vf#0:0 @ 0x561e923dd540] Terminating thread with return code -38
(Function not implemented)
[vost#0:0/hevc_vulkan @ 0x561e9243b200] Could not open encoder before EOF
[vost#0:0/hevc_vulkan @ 0x561e9243b200] Task finished with error code:
-22 (Invalid argument)
[vost#0:0/hevc_vulkan @ 0x561e9243b200] Terminating thread with return
code -22 (Invalid argument)
[out#0/mp4 @ 0x561e924a7a00] Nothing was written into output file,
because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A
[aac @ 0x561e92cc4f80] Qavg: 208.809
Conversion failed!
=====================
Benchmarking works:
ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
-hwaccel_output_format vulkan -i hdv09_04_h264_qsv_8b420.mp4 -f null -
-benchmark
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_h264_qsv_8b420.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.1.100
Duration: 00:03:58.88, start: 0.000000, bitrate: 7671 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
yuvj420p(pc, smpte170m/unknown/unknown, progressive), 1440x1080 [SAR 4:3
DAR 16:9], 7536 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 129 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.7.100
Stream #0:0(und): Video: wrapped_avframe, vulkan(pc,
smpte170m/unknown/unknown, progressive), 1440x1080 [SAR 4:3 DAR 16:9],
q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.19.101 wrapped_avframe
Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
(default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.19.101 pcm_s16le
More information about the Cin
mailing list