System ffmpeg Vulkan video transcoding fails - while benchmarking works
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
On Sat, Apr 26, 2025 at 8:28 PM Terje Hanssen via Cin <[email protected]> wrote:
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!
=====================
ah, syntax was slightly different, you apparently need to "link" vulcan decode and filtering via common naming? My line fails in similar way: ./bin/ffmpeg711-vulkan -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i ~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 11.2.0 (GCC) configuration: --enable-opencl --disable-debug --enable-libx265 --enable-libx264 --enable-gpl --enable-libplacebo --enable-vulkan --enable-libshaderc --enable-libzimg --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [aist#0:1/pcm_s16le @ 0xc4c4740] Guessed Channel Layout: stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2020-12-18T22:20:29.000000Z com.apple.quicktime.creationdate: 2020-12-18T17:20:29-0500 com.apple.quicktime.location.ISO6709: +33.4233-084.5802/ Duration: 00:00:19.16, start: 0.000000, bitrate: 69140 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(pc, bt2020nc/bt2020/smpte2084), 3840x2160, 64166 kb/s, 59.92 fps, 59.94 tbr, 600 tbn (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : HEVC Stream #0:1[0x2](und): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0' [vf#0:0 @ 0xc4e1a00] Error reinitializing filters! [vf#0:0 @ 0xc4e1a00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0xc4e1a00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/hevc_vulkan @ 0xc43b780] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0xc43b780] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0xc43b780] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0xc43be00] 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 Conversion failed! bash-5.1$
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
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
On 4/26/25 18:09, Andrew Randrianasulu wrote:
On Sat, Apr 26, 2025 at 8:28 PM Terje Hanssen via Cin <[email protected]> wrote:
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!
=====================
ah, syntax was slightly different, you apparently need to "link" vulcan decode and filtering via common naming?
I am afraid I don't understand how to "link vulkan decode and filtering via common naming?" Could you possibly give me one or two examples to test with my code line?
My line fails in similar way:
./bin/ffmpeg711-vulkan -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i ~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 11.2.0 (GCC) configuration: --enable-opencl --disable-debug --enable-libx265 --enable-libx264 --enable-gpl --enable-libplacebo --enable-vulkan --enable-libshaderc --enable-libzimg --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [aist#0:1/pcm_s16le @ 0xc4c4740] Guessed Channel Layout: stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2020-12-18T22:20:29.000000Z com.apple.quicktime.creationdate: 2020-12-18T17:20:29-0500 com.apple.quicktime.location.ISO6709: +33.4233-084.5802/ Duration: 00:00:19.16, start: 0.000000, bitrate: 69140 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(pc, bt2020nc/bt2020/smpte2084), 3840x2160, 64166 kb/s, 59.92 fps, 59.94 tbr, 600 tbn (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : HEVC Stream #0:1[0x2](und): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0' [vf#0:0 @ 0xc4e1a00] Error reinitializing filters! [vf#0:0 @ 0xc4e1a00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0xc4e1a00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/hevc_vulkan @ 0xc43b780] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0xc43b780] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0xc43b780] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0xc43be00] 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 Conversion failed! bash-5.1$
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
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
сб, 26 апр. 2025 г., 22:34 Terje Hanssen <[email protected]>:
On 4/26/25 18:09, Andrew Randrianasulu wrote:
On Sat, Apr 26, 2025 at 8:28 PM Terje Hanssen via Cin <[email protected]> wrote:
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!
=====================
ah, syntax was slightly different, you apparently need to "link" vulcan decode and filtering via common naming?
I am afraid I don't understand how to "link vulkan decode and filtering via common naming?" Could you possibly give me one or two examples to test with my code line?
It was note to myself on this part of ffmpeg command line I was missing/misusing in my attempts: ffmpeg -hide_banner -init_hw_device vulkan=vk:0 -filter_hw_device vk -i file .... so ot inits hw device of type vulkan and gives it name, vk:0 and then filter_hw_device uses same name. I was getting error because I used only -init_hw_device vulkan without "=name" part. But still similar filtering error. Now building ffmpeg.git to see if anything improved there ....
My line fails in similar way:
./bin/ffmpeg711-vulkan -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i ~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov -vf
libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv
-c:a copy -c:v hevc_vulkan -f avi /dev/null ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 11.2.0 (GCC) configuration: --enable-opencl --disable-debug --enable-libx265 --enable-libx264 --enable-gpl --enable-libplacebo --enable-vulkan --enable-libshaderc --enable-libzimg --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [aist#0:1/pcm_s16le @ 0xc4c4740] Guessed Channel Layout: stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2020-12-18T22:20:29.000000Z com.apple.quicktime.creationdate: 2020-12-18T17:20:29-0500 com.apple.quicktime.location.ISO6709: +33.4233-084.5802/ Duration: 00:00:19.16, start: 0.000000, bitrate: 69140 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(pc, bt2020nc/bt2020/smpte2084), 3840x2160, 64166 kb/s, 59.92 fps, 59.94 tbr, 600 tbn (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : HEVC Stream #0:1[0x2](und): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0' [vf#0:0 @ 0xc4e1a00] Error reinitializing filters! [vf#0:0 @ 0xc4e1a00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0xc4e1a00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/hevc_vulkan @ 0xc43b780] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0xc43b780] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0xc43b780] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0xc43be00] 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 Conversion failed! bash-5.1$
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
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
I re-did the test because I had not put in the environment variables. It seems to me that the result is similar: export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json export ANV_VIDEO_DECODE=1 export ANV_VIDEO_ENCODE=1 ffmpeg -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i hdr_02.mp4 -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null [...] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdr_02.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2017-06-04T23:05:26.000000Z encoder : Lavf57.72.101 Duration: 00:02:38.56, start: 0.000000, bitrate: 60142 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DA R 16:9], 60000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [AVHWFramesContext @ 0x75ca2001aac0] Unsupported pixel format: vaapi! [Parsed_libplacebo_0 @ 0x75ca20004600] Failed to configure output pad on Parsed_libplacebo_0 [vf#0:0 @ 0x5b20b569c5c0] Error reinitializing filters! [vf#0:0 @ 0x5b20b569c5c0] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x5b20b569c5c0] Terminating thread with return code -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x5b20b55c3c80] 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 Conversion failed!
сб, 26 апр. 2025 г., 22:48 Andrea paz <[email protected]>:
I re-did the test because I had not put in the environment variables.
RADV (AMD) need different ones... https://www.phoronix.com/news/RADV-Vulkan-Video-VCN4 ===== The RDNA2 support remains off by default and there is no word from AMD yet when they may be providing updated firmware for the video events compatibility. Otherwise the support can be enabled via the *RADV_PERFTEST=video_decode* and *RADV_PERFTEST=video_encode* environment variables manually. ==== but my hope was to see if libplacebo can be used with vaapi decode as noted in ffmpeg docs: https://ffmpeg.org/ffmpeg-filters.html#libplacebo ==== Interop with VAAPI hwdec to avoid round-tripping through RAM: ffmpeg -init_hw_device vulkan -hwaccel vaapi -hwaccel_output_format vaapi ... -vf libplacebo ===== It seems to me that the result is similar:
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json export ANV_VIDEO_DECODE=1 export ANV_VIDEO_ENCODE=1
ffmpeg -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i hdr_02.mp4 -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null [...] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdr_02.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2017-06-04T23:05:26.000000Z encoder : Lavf57.72.101 Duration: 00:02:38.56, start: 0.000000, bitrate: 60142 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DA R 16:9], 60000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [AVHWFramesContext @ 0x75ca2001aac0] Unsupported pixel format: vaapi! [Parsed_libplacebo_0 @ 0x75ca20004600] Failed to configure output pad on Parsed_libplacebo_0 [vf#0:0 @ 0x5b20b569c5c0] Error reinitializing filters! [vf#0:0 @ 0x5b20b569c5c0] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x5b20b569c5c0] Terminating thread with return code -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x5b20b55c3c80] 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 Conversion failed!
сб, 26 апр. 2025 г., 22:58 Andrew Randrianasulu <[email protected]>:
сб, 26 апр. 2025 г., 22:48 Andrea paz <[email protected]>:
I re-did the test because I had not put in the environment variables.
RADV (AMD) need different ones...
https://www.phoronix.com/news/RADV-Vulkan-Video-VCN4
===== The RDNA2 support remains off by default and there is no word from AMD yet when they may be providing updated firmware for the video events compatibility. Otherwise the support can be enabled via the *RADV_PERFTEST=video_decode* and *RADV_PERFTEST=video_encode* environment variables manually.
====
but my hope was to see if libplacebo can be used with vaapi decode as noted in ffmpeg docs:
https://ffmpeg.org/ffmpeg-filters.html#libplacebo ==== Interop with VAAPI hwdec to avoid round-tripping through RAM:
ffmpeg -init_hw_device vulkan -hwaccel vaapi -hwaccel_output_format vaapi ... -vf libplacebo
=====
Decode seems to work, and together with libplacebo's tonemap and pulling frames back to sysmem I got 15 fps at full 4k! RADV_PERFTEST=video_decode,video_encode time -p ./ffmpeg -init_hw_device vulkan=vulkan -filter_hw_device vulkan -hwaccel vulkan -i ~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v rawvideo -f nut -benchmark /dev/null frame= 1148 fps= 15 q=-0.0 Lsize=27900063KiB time=00:00:19.16 bitrate=11927607.4kbits/s speed=0.246x bench: utime=36.673s stime=64.718s rtime=77.794s bench: maxrss=703552KiB real 79.39 user 36.77 sys 64.78
It seems to me that the result is similar:
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json export ANV_VIDEO_DECODE=1 export ANV_VIDEO_ENCODE=1
ffmpeg -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i hdr_02.mp4 -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null [...] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdr_02.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2017-06-04T23:05:26.000000Z encoder : Lavf57.72.101 Duration: 00:02:38.56, start: 0.000000, bitrate: 60142 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DA R 16:9], 60000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [AVHWFramesContext @ 0x75ca2001aac0] Unsupported pixel format: vaapi! [Parsed_libplacebo_0 @ 0x75ca20004600] Failed to configure output pad on Parsed_libplacebo_0 [vf#0:0 @ 0x5b20b569c5c0] Error reinitializing filters! [vf#0:0 @ 0x5b20b569c5c0] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x5b20b569c5c0] Terminating thread with return code -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5b20b56c5580] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x5b20b55c3c80] 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 Conversion failed!
OK; the new test: export RADV_PERFTEST=video_decode,video_encode time -p ffmpeg -init_hw_device vulkan=vulkan -filter_hw_device vulkan -hwaccel vulkan -i hdr_02.mp4 -vf libplaceb o=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v rawvideo -f nut -benchmark /dev/null [...] Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> rawvideo (native)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Output #0, nut, to '/dev/null': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf61.7.100 Stream #0:0: Video: rawvideo (RGB[15] / 0xF424752), p010le(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 7457502 k b/s, 59.94 fps, 60k tbn (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z X-Language : und handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc61.19.100 rawvideo Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z X-Language : und handler_name : SoundHandler vendor_id : [0][0][0][0] [out#0/nut @ 0x6397911f8200] video:230947200KiB audio:2438KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0 .000243% frame= 9504 fps= 93 q=-0.0 Lsize=230950199KiB time=00:02:38.52 bitrate=11934447.1kbits/s speed=1.54x bench: utime=99.985s stime=32.366s rtime=102.719s bench: maxrss=1764140KiB real 105,83 user 100,02 sys 32,43
сб, 26 апр. 2025 г., 23:33 Andrea paz <[email protected]>:
OK; the new test:
export RADV_PERFTEST=video_decode,video_encode time -p ffmpeg -init_hw_device vulkan=vulkan -filter_hw_device vulkan -hwaccel vulkan -i hdr_02.mp4 -vf libplaceb o=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v rawvideo -f nut -benchmark /dev/null [...] Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> rawvideo (native)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Output #0, nut, to '/dev/null': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf61.7.100 Stream #0:0: Video: rawvideo (RGB[15] / 0xF424752), p010le(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 7457502 k b/s, 59.94 fps, 60k tbn (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z X-Language : und handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc61.19.100 rawvideo Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z X-Language : und handler_name : SoundHandler vendor_id : [0][0][0][0] [out#0/nut @ 0x6397911f8200] video:230947200KiB audio:2438KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0 .000243% frame= 9504 fps= 93 q=-0.0 Lsize=230950199KiB time=00:02:38.52 bitrate=11934447.1kbits/s speed=1.54x bench: utime=99.985s stime=32.366s rtime=102.719s bench: maxrss=1764140KiB real 105,83 user 100,02 sys 32,43
like 6x faster than my case ;)
My test (with another video): $ ffmpeg -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i hdr_02.mp4 -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null [...] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdr_02.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2017-06-04T23:05:26.000000Z encoder : Lavf57.72.101 Duration: 00:02:38.56, start: 0.000000, bitrate: 60142 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DA R 16:9], 60000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2017-06-04T23:05:26.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [AVHWFramesContext @ 0x7904d401aac0] Unsupported pixel format: vaapi! [Parsed_libplacebo_0 @ 0x7904d4004600] Failed to configure output pad on Parsed_libplacebo_0 [vf#0:0 @ 0x5cc205a12800] Error reinitializing filters! [vf#0:0 @ 0x5cc205a12800] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x5cc205a12800] Terminating thread with return code -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5cc205a3b0c0] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0x5cc205a3b0c0] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0x5cc205a3b0c0] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x5cc205938c80] 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 Conversion failed!
Den 26.04.2025 18:09, skrev Andrew Randrianasulu:
On Sat, Apr 26, 2025 at 8:28 PM Terje Hanssen via Cin <[email protected]> wrote:
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!
=====================
ah, syntax was slightly different, you apparently need to "link" vulcan decode and filtering via common naming?
My line fails in similar way:
./bin/ffmpeg711-vulkan -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i ~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 11.2.0 (GCC) configuration: --enable-opencl --disable-debug --enable-libx265 --enable-libx264 --enable-gpl --enable-libplacebo --enable-vulkan --enable-libshaderc --enable-libzimg --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [aist#0:1/pcm_s16le @ 0xc4c4740] Guessed Channel Layout: stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2020-12-18T22:20:29.000000Z com.apple.quicktime.creationdate: 2020-12-18T17:20:29-0500 com.apple.quicktime.location.ISO6709: +33.4233-084.5802/ Duration: 00:00:19.16, start: 0.000000, bitrate: 69140 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(pc, bt2020nc/bt2020/smpte2084), 3840x2160, 64166 kb/s, 59.92 fps, 59.94 tbr, 600 tbn (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : HEVC Stream #0:1[0x2](und): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0' [vf#0:0 @ 0xc4e1a00] Error reinitializing filters! [vf#0:0 @ 0xc4e1a00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0xc4e1a00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/hevc_vulkan @ 0xc43b780] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0xc43b780] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0xc43b780] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0xc43be00] 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 Conversion failed! bash-5.1$
I am still struggling to get vulkan transcoding to work on Intel i7-12700KF with API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.0.5 renderer: Mesa Intel Arc A750 Graphics (DG2) API: Vulkan v: 1.4.309 drivers: N/A surfaces: xcb,xlib Because the corresponding ffmpeg syntax works fine using "vaapi" instead of "vulkan", I hope to get a modified syntax for vulkan to try: ffmpeg -hide_banner -init_hw_device vulkan -i hdv09_04.m2t -vf format=nv12,hwupload -c:v hevc_vulkan -y hdv09_04_hevc_vulkan_nv12.mp4 [mpeg2video @ 0x563224f43f00] Invalid frame dimensions 0x0. Last message repeated 3 times [mpegts @ 0x563224f22240] PES packet size mismatch [mpegts @ 0x563224f22240] Packet corrupt (stream = 1, dts = 258142320). [mpegts @ 0x563224f22240] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0x563224f22240] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, mpegts, from 'hdv09_04.m2t': Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s Program 100 Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0) Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (mp2 (native) -> aac (native)) Press [q] to stop, [?] for help [hevc_vulkan @ 0x563224f1fa80] No rate control settings specified, using fixed QP = 18 Output #0, mp4, to 'hdv09_04_hevc_vulkan_nv12.mp4': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: hevc (Main) (hev1 / 0x31766568), vulkan(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 12800 tbn Metadata: encoder : Lavc61.19.101 hevc_vulkan Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc61.19.101 aac [hevc_vulkan @ 0x563224f1fa80] Encode failed: -167801120. [vost#0:0/hevc_vulkan @ 0x563224f62500] Error submitting video frame to the encoder [vost#0:0/hevc_vulkan @ 0x563224f62500] Error encoding a frame: Error number -167801120 occurred [vost#0:0/hevc_vulkan @ 0x563224f62500] Task finished with error code: -167801120 (Error number -167801120 occurred) [vost#0:0/hevc_vulkan @ 0x563224f62500] Terminating thread with return code -167801120 (Error number -167801120 occurred) Unable to submit command buffer: VK_ERROR_DEVICE_LOST [hwupload @ 0x7f05d4004440] Failed to upload frame: -542398533. [vf#0:0 @ 0x563224f3f8c0] Error while filtering: Generic error in an external library [vf#0:0 @ 0x563224f3f8c0] Task finished with error code: -542398533 (Generic error in an external library) [vf#0:0 @ 0x563224f3f8c0] Terminating thread with return code -542398533 (Generic error in an external library) [out#0/mp4 @ 0x563224f41d80] video:0KiB audio:21KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 5.119681% frame= 0 fps=0.0 q=0.0 Lsize= 22KiB time=N/A bitrate=N/A speed=N/A [aac @ 0x563224f4a6c0] Qavg: 179.018 Conversion failed!
вс, 25 мая 2025 г., 22:24 Terje J. Hanssen <[email protected]>:
Den 26.04.2025 18:09, skrev Andrew Randrianasulu:
On Sat, Apr 26, 2025 at 8:28 PM Terje Hanssen via Cin<[email protected]> <[email protected]> wrote:
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!
=====================
ah, syntax was slightly different, you apparently need to "link" vulcan decode and filtering via common naming?
My line fails in similar way:
./bin/ffmpeg711-vulkan -init_hw_device vulkan=vk:0 -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -i ~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov -vf libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv -c:a copy -c:v hevc_vulkan -f avi /dev/null ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 11.2.0 (GCC) configuration: --enable-opencl --disable-debug --enable-libx265 --enable-libx264 --enable-gpl --enable-libplacebo --enable-vulkan --enable-libshaderc --enable-libzimg --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [aist#0:1/pcm_s16le @ 0xc4c4740] Guessed Channel Layout: stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2020-12-18T22:20:29.000000Z com.apple.quicktime.creationdate: 2020-12-18T17:20:29-0500 com.apple.quicktime.location.ISO6709: +33.4233-084.5802/ Duration: 00:00:19.16, start: 0.000000, bitrate: 69140 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(pc, bt2020nc/bt2020/smpte2084), 3840x2160, 64166 kb/s, 59.92 fps, 59.94 tbr, 600 tbn (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : HEVC Stream #0:1[0x2](und): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2020-12-18T22:20:29.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] File '/dev/null' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0' [vf#0:0 @ 0xc4e1a00] Error reinitializing filters! [vf#0:0 @ 0xc4e1a00] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0xc4e1a00] Terminating thread with return code -38 (Function not implemented) [vost#0:0/hevc_vulkan @ 0xc43b780] Could not open encoder before EOF [vost#0:0/hevc_vulkan @ 0xc43b780] Task finished with error code: -22 (Invalid argument) [vost#0:0/hevc_vulkan @ 0xc43b780] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0xc43be00] 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 Conversion failed! bash-5.1$
I am still struggling to get vulkan transcoding to work on Intel i7-12700KF with
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.0.5 renderer: Mesa Intel Arc A750 Graphics (DG2) API: Vulkan v: 1.4.309 drivers: N/A surfaces: xcb,xlib
Because the corresponding ffmpeg syntax works fine using "vaapi" instead of "vulkan", I hope to get a modified syntax for vulkan to try:
ffmpeg -hide_banner -init_hw_device vulkan -i hdv09_04.m2t -vf format=nv12,hwupload -c:v hevc_vulkan -y hdv09_04_hevc_vulkan_nv12.mp4
[mpeg2video @ 0x563224f43f00] Invalid frame dimensions 0x0. Last message repeated 3 times [mpegts @ 0x563224f22240] PES packet size mismatch [mpegts @ 0x563224f22240] Packet corrupt (stream = 1, dts = 258142320). [mpegts @ 0x563224f22240] Could not find codec parameters for stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options [mpegts @ 0x563224f22240] Could not find codec parameters for stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'hdv09_04.m2t': Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s Program 100 Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn Side data: cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032 vbv_delay: N/A Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0) Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1) Stream mapping: Stream #0:0 -> #0:0 (mpeg2video (native) -> hevc (hevc_vulkan)) Stream #0:1 -> #0:1 (mp2 (native) -> aac (native)) Press [q] to stop, [?] for help [hevc_vulkan @ 0x563224f1fa80] No rate control settings specified, using fixed QP = 18
Output #0, mp4, to 'hdv09_04_hevc_vulkan_nv12.mp4': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: hevc (Main) (hev1 / 0x31766568), vulkan(tv, bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 25 fps, 12800 tbn Metadata: encoder : Lavc61.19.101 hevc_vulkan Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc61.19.101 aac
[hevc_vulkan @ 0x563224f1fa80] Encode failed: -167801120. [vost#0:0/hevc_vulkan @ 0x563224f62500] Error submitting video frame to the encoder [vost#0:0/hevc_vulkan @ 0x563224f62500] Error encoding a frame: Error number -167801120 occurred [vost#0:0/hevc_vulkan @ 0x563224f62500] Task finished with error code: -167801120 (Error number -167801120 occurred) [vost#0:0/hevc_vulkan @ 0x563224f62500] Terminating thread with return code -167801120 (Error number -167801120 occurred) Unable to submit command buffer: VK_ERROR_DEVICE_LOST [hwupload @ 0x7f05d4004440] Failed to upload frame: -542398533. [vf#0:0 @ 0x563224f3f8c0] Error while filtering: Generic error in an external library [vf#0:0 @ 0x563224f3f8c0] Task finished with error code: -542398533 (Generic error in an external library) [vf#0:0 @ 0x563224f3f8c0] Terminating thread with return code -542398533 (Generic error in an external library) [out#0/mp4 @ 0x563224f41d80] video:0KiB audio:21KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 5.119681% frame= 0 fps=0.0 q=0.0 Lsize= 22KiB time=N/A bitrate=N/A speed=N/A [aac @ 0x563224f4a6c0] Qavg: 179.018 Conversion failed!
May be interlaced encoding via Vulkan not supported yet? Try progressive source, if it works look for mesa3d for existing ANV + interlaced HEVC encoding bug, if it does not exist - create one.
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Terje Hanssen -
Terje J. Hanssen