[FFmpeg-trac] #11229(avfilter:new): libplacebo and ffmpeg git tip Vulkan initialization failure(s)
FFmpeg
trac at avcodec.org
Tue Oct 8 17:48:21 EEST 2024
#11229: libplacebo and ffmpeg git tip Vulkan initialization failure(s)
-------------------------------------+-------------------------------------
Reporter: Dennis E. | Owner: (none)
Mungai |
Type: defect | Status: new
Priority: normal | Component: avfilter
Version: git-master | Resolution:
Keywords: libplacebo | Blocked By:
,vulkan |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by Dennis E. Mungai:
Old description:
> **Summary of the bug:**
>
> Inserting `libplacebo` at any point in the filter chain **with OR
> without** Vulkan en/decoding enabled results in an initialization
> failure, as shown below.
>
> Derived Vulkan hardware contexts followed by {{{libplacebo}}} in the
> filter chain(s) also results in failure.
>
> **How to reproduce:**
>
> **(a). With NVIDIA:**
>
> {{{
> ffmpeg -loglevel debug -init_hw_device
> "vulkan=vk:0,debug=0,disable_multiplane=1" -f lavfi -i
> color=red:s=3840x2160 -vf hwupload,libplacebo,hwdownload,format=yuv420p
> -f null -
> }}}
>
> Results in:
>
> {{{
> ffmpeg version N-117372-g6871fd3170 Copyright (c) 2000-2024 the FFmpeg
> developers
> built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
> configuration: --libdir=/usr/local/lib --enable-shared --disable-debug
> --disable-doc --disable-htmlpages --disable-manpages --disable-podpages
> --disable-txtpages --disable-ffplay --enable-alsa --enable-cuvid
> --enable-libplacebo --enable-librav1e --enable-libdav1d --enable-
> libshaderc --enable-libv4l2 --enable-libvmaf --enable-libvpl --enable-
> libxml2 --enable-nvdec --enable-nvenc --enable-cuda-llvm --nvcc=clang
> --nvccflags='--cuda-gpu-arch=sm_60 -O2' --enable-opencl --enable-vaapi
> --enable-vdpau --enable-version3 --enable-vulkan --enable-libopencore-
> amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-
> fontconfig --enable-libfreetype --enable-libvidstab --enable-libharfbuzz
> --enable-libmp3lame --enable-libopus --enable-libtheora --enable-
> libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-
> libsvtav1 --enable-libx264 --enable-nonfree --enable-openssl --enable-
> lzma --enable-zlib --enable-gmp --enable-libfdk_aac --enable-postproc
> --enable-libzmq --enable-lv2 --enable-ladspa --enable-libxeve --enable-
> libxevd --enable-liblcevc-dec --enable-libzvbi --enable-decklink
> --enable-libklvanc --enable-libopenjpeg --enable-libjxl --enable-libzimg
> --enable-pocketsphinx --enable-libmysofa --enable-libquirc --enable-
> libqrencode --enable-libkvazaar --enable-libaom --enable-libsrt --enable-
> librist --extra-libs='-lpthread -lm -lz -ldl' --extra-
> cflags=-I/tmp/workdir/Blackmagic-SDK-14/Linux/include/
> libavutil 59. 41.100 / 59. 41.100
> libavcodec 61. 21.100 / 61. 21.100
> libavformat 61. 9.100 / 61. 9.100
> libavdevice 61. 4.100 / 61. 4.100
> libavfilter 10. 6.100 / 10. 6.100
> libswscale 8. 4.100 / 8. 4.100
> libswresample 5. 4.100 / 5. 4.100
> libpostproc 58. 4.100 / 58. 4.100
> Splitting the commandline.
> Reading option '-loglevel' ... matched as option 'loglevel' (set logging
> level) with argument 'debug'.
> Reading option '-init_hw_device' ... matched as option 'init_hw_device'
> (initialise hardware device) with argument
> 'vulkan=vk:0,debug=0,disable_multiplane=1'.
> Reading option '-f' ... matched as option 'f' (force container format
> (auto-detected otherwise)) with argument 'lavfi'.
> Reading option '-i' ... matched as input url with argument
> 'color=red:s=3840x2160'.
> Reading option '-vf' ... matched as option 'vf' (alias for -filter:v
> (apply filters to video streams)) with argument
> 'hwupload,libplacebo,hwdownload,format=yuv420p'.
> Reading option '-f' ... matched as option 'f' (force container format
> (auto-detected otherwise)) with argument 'null'.
> Reading option '-' ... matched as output url.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option loglevel (set logging level) with argument debug.
> Applying option init_hw_device (initialise hardware device) with argument
> vulkan=vk:0,debug=0,disable_multiplane=1.
> [AVHWDeviceContext @ 0x620714ae9280] Supported layers:
> [AVHWDeviceContext @ 0x620714ae9280] VK_LAYER_NV_optimus
> [AVHWDeviceContext @ 0x620714ae9280] VK_LAYER_MESA_device_select
> [AVHWDeviceContext @ 0x620714ae9280] VK_LAYER_MESA_overlay
> [AVHWDeviceContext @ 0x620714ae9280] Using instance extension
> VK_KHR_portability_enumeration
> [AVHWDeviceContext @ 0x620714ae9280] GPU listing:
> [AVHWDeviceContext @ 0x620714ae9280] 0: NVIDIA GeForce RTX 4060
> Laptop GPU (discrete) (0x28a0)
> [AVHWDeviceContext @ 0x620714ae9280] Device 0 selected: NVIDIA GeForce
> RTX 4060 Laptop GPU (discrete) (0x28a0)
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_push_descriptor
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_descriptor_buffer
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_physical_device_drm
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_shader_atomic_float
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_cooperative_matrix
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_NV_optical_flow
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_shader_object
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_maintenance1
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_external_memory_fd
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_external_memory_dma_buf
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_image_drm_format_modifier
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_external_semaphore_fd
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_EXT_external_memory_host
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_queue
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_encode_queue
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_decode_queue
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_encode_h264
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_decode_h264
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_encode_h265
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_decode_h265
> [AVHWDeviceContext @ 0x620714ae9280] Using device extension
> VK_KHR_video_decode_av1
> [AVHWDeviceContext @ 0x620714ae9280] Queue families:
> [AVHWDeviceContext @ 0x620714ae9280] 0: graphics compute transfer
> sparse (queues: 16)
> [AVHWDeviceContext @ 0x620714ae9280] 1: transfer sparse (queues: 2)
> [AVHWDeviceContext @ 0x620714ae9280] 2: compute transfer sparse
> (queues: 8)
> [AVHWDeviceContext @ 0x620714ae9280] 3: transfer decode sparse
> (queues: 1)
> [AVHWDeviceContext @ 0x620714ae9280] 4: transfer encode sparse
> (queues: 1)
> [AVHWDeviceContext @ 0x620714ae9280] 5: transfer sparse optical_flow
> (queues: 1)
> [AVHWDeviceContext @ 0x620714ae9280] Using device: NVIDIA GeForce RTX
> 4060 Laptop GPU
> [AVHWDeviceContext @ 0x620714ae9280] Alignments:
> [AVHWDeviceContext @ 0x620714ae9280]
> optimalBufferCopyRowPitchAlignment: 1
> [AVHWDeviceContext @ 0x620714ae9280] minMemoryMapAlignment:
> 64
> [AVHWDeviceContext @ 0x620714ae9280] nonCoherentAtomSize:
> 64
> [AVHWDeviceContext @ 0x620714ae9280] minImportedHostPointerAlignment:
> 4096
> [AVHWDeviceContext @ 0x620714ae9280] Using queue family 0 (queues: 16)
> for graphics
> [AVHWDeviceContext @ 0x620714ae9280] Using queue family 2 (queues: 8) for
> compute
> [AVHWDeviceContext @ 0x620714ae9280] Using queue family 1 (queues: 2) for
> transfers
> [AVHWDeviceContext @ 0x620714ae9280] Using queue family 3 (queues: 1) for
> decode
> [AVHWDeviceContext @ 0x620714ae9280] Using queue family 4 (queues: 1) for
> encode
> Successfully parsed a group of options.
> Parsing a group of options: input url color=red:s=3840x2160.
> Applying option f (force container format (auto-detected otherwise)) with
> argument lavfi.
> Successfully parsed a group of options.
> Opening an input file: color=red:s=3840x2160.
> [AVFilterGraph @ 0x6207181681c0] Setting 'color' to value 'red'
> [AVFilterGraph @ 0x6207181681c0] Setting 's' to value '3840x2160'
> detected 20 logical cores
> [Parsed_color_0 @ 0x62071816b600] size:3840x2160 rate:25/1
> duration:-1.000000 sar:1/1
> [AVFilterGraph @ 0x6207181681c0] query_formats: 2 queried, 3 merged, 0
> already done, 0 delayed
> [lavfi @ 0x620718167980] All info found
> Input #0, lavfi, from 'color=red:s=3840x2160':
> Duration: N/A, start: 0.000000, bitrate: N/A
> Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame,
> yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 25 tbn
> Successfully opened the file.
> Parsing a group of options: output url -.
> Applying option vf (alias for -filter:v (apply filters to video streams))
> with argument hwupload,libplacebo,hwdownload,format=yuv420p.
> Applying option f (force container format (auto-detected otherwise)) with
> argument null.
> Successfully parsed a group of options.
> Opening an output file: -.
> [out#0/null @ 0x620715169480] No explicit maps, mapping streams
> automatically...
> [vost#0:0/wrapped_avframe @ 0x620715169f80] Created video stream from
> input stream 0:0
> [AVFilterGraph @ 0x62071516b4c0] Setting 'pix_fmts' to value 'yuv420p'
> [libplacebo @ 0x62071516c280] Initialized libplacebo v7.349.0
> (v7.349.0-15-g756220c3) (API v349)
> Successfully opened the file.
> Stream mapping:
> Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe
> (native))
> [vost#0:0/wrapped_avframe @ 0x620715169f80] Starting thread...
> [vf#0:0 @ 0x62071516af80] Starting thread...
> [vist#0:0/wrapped_avframe @ 0x620715167c40] [dec:wrapped_avframe @
> 0x62071516c6c0] Starting thread...
> [in#0/lavfi @ 0x620718167640] Starting thread...
> Press [q] to stop, [?] for help
> [AVFilterGraph @ 0x7e50980011c0] Setting 'pix_fmts' to value 'yuv420p'
> [libplacebo @ 0x7e5098004e40] Initialized libplacebo v7.349.0
> (v7.349.0-15-g756220c3) (API v349)
> [graph -1 input from stream 0:0 @ 0x7e509800a740] w:3840 h:2160
> pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 csp:unknown range:unknown
> [libplacebo @ 0x7e5098004e40] Imported vulkan device properties:
> [libplacebo @ 0x7e5098004e40] Device Name: NVIDIA GeForce RTX 4060
> Laptop GPU
> [libplacebo @ 0x7e5098004e40] Device ID: 10de:28a0
> [libplacebo @ 0x7e5098004e40] Device UUID:
> 46:B0:D7:C4:58:6B:CE:2C:FF:BB:05:7E:5D:96:AB:7E
> [libplacebo @ 0x7e5098004e40] Driver version: 8c08c0c0
> [libplacebo @ 0x7e5098004e40] API version: 1.3.280
> [libplacebo @ 0x7e5098004e40] Restricting API version to 1.3.0... new
> version 1.3.0
> [libplacebo @ 0x7e5098004e40] Missing device feature: hostQueryReset
> [libplacebo @ 0x7e5098004e40] Imported Vulkan device was not created with
> all required features!
> [libplacebo @ 0x7e5098004e40] Failed importing vulkan device
> [libplacebo @ 0x7e5098004e40] Failed importing Vulkan device!
> [Parsed_libplacebo_1 @ 0x7e5098004d00] Query format failed for
> 'Parsed_libplacebo_1': Generic error in an external library
> [vf#0:0 @ 0x62071516af80] Error reinitializing filters!
> [vf#0:0 @ 0x62071516af80] Task finished with error code: -542398533
> (Generic error in an external library)
> [vf#0:0 @ 0x62071516af80] Terminating thread with return code -542398533
> (Generic error in an external library)
> [vost#0:0/wrapped_avframe @ 0x620715169f80] [enc:wrapped_avframe @
> 0x62071516a940] Encoder thread received EOF
> [vost#0:0/wrapped_avframe @ 0x620715169f80] [enc:wrapped_avframe @
> 0x62071516a940] Could not open encoder before EOF
> [vist#0:0/wrapped_avframe @ 0x620715167c40] [dec:wrapped_avframe @
> 0x62071516c6c0] Decoder returned EOF, finishing
> [vist#0:0/wrapped_avframe @ 0x620715167c40] [dec:wrapped_avframe @
> 0x62071516c6c0] Terminating thread with return code 0 (success)
> [vost#0:0/wrapped_avframe @ 0x620715169f80] Task finished with error
> code: -22 (Invalid argument)
> [vost#0:0/wrapped_avframe @ 0x620715169f80] Terminating thread with
> return code -22 (Invalid argument)
> [vist#0:0/wrapped_avframe @ 0x620715167c40] All consumers of this stream
> are done
> [in#0/lavfi @ 0x620718167640] All consumers are done
> [in#0/lavfi @ 0x620718167640] Terminating thread with return code 0
> (success)
> [out#0/null @ 0x620715169480] 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
> [in#0/lavfi @ 0x620718167640] Input file #0 (color=red:s=3840x2160):
> [in#0/lavfi @ 0x620718167640] Input stream #0:0 (video): 19 packets
> read (8360 bytes); 10 frames decoded; 0 decode errors;
> [in#0/lavfi @ 0x620718167640] Total: 19 packets (8360 bytes) demuxed
> Conversion failed!
> }}}
>
> **(b). Replicated on an Intel setup:**
>
> An identical command as before:
>
> {{{
> ffmpeg -loglevel debug -init_hw_device
> "vulkan=vk:0,debug=0,disable_multiplane=1" -f lavfi -i
> color=red:s=3840x2160 -vf hwupload,libplacebo,hwdownload,format=yuv420p
> -f null -
> }}}
>
> **Output:**
>
> {{{
> ffmpeg version N-117372-g6871fd3170 Copyright (c) 2000-2024 the FFmpeg
> developers
> built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
> configuration: --libdir=/usr/local/lib --enable-shared --disable-debug
> --disable-doc --disable-htmlpages --disable-manpages --disable-podpages
> --disable-txtpages --disable-ffplay --enable-alsa --enable-cuvid
> --enable-libplacebo --enable-librav1e --enable-libdav1d --enable-
> libshaderc --enable-libv4l2 --enable-libvmaf --enable-libvpl --enable-
> libxml2 --enable-nvdec --enable-nvenc --enable-cuda-llvm --nvcc=clang
> --nvccflags='--cuda-gpu-arch=sm_60 -O2' --enable-opencl --enable-vaapi
> --enable-vdpau --enable-version3 --enable-vulkan --enable-libopencore-
> amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-
> fontconfig --enable-libfreetype --enable-libvidstab --enable-libharfbuzz
> --enable-libmp3lame --enable-libopus --enable-libtheora --enable-
> libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-
> libsvtav1 --enable-libx264 --enable-nonfree --enable-openssl --enable-
> lzma --enable-zlib --enable-gmp --enable-libfdk_aac --enable-postproc
> --enable-libzmq --enable-lv2 --enable-ladspa --enable-libxeve --enable-
> libxevd --enable-liblcevc-dec --enable-libzvbi --enable-decklink
> --enable-libklvanc --enable-libopenjpeg --enable-libjxl --enable-libzimg
> --enable-pocketsphinx --enable-libmysofa --enable-libquirc --enable-
> libqrencode --enable-libkvazaar --enable-libaom --enable-libsrt --enable-
> librist --extra-libs='-lpthread -lm -lz -ldl' --extra-
> cflags=-I/tmp/workdir/Blackmagic-SDK-14/Linux/include/
> libavutil 59. 41.100 / 59. 41.100
> libavcodec 61. 21.100 / 61. 21.100
> libavformat 61. 9.100 / 61. 9.100
> libavdevice 61. 4.100 / 61. 4.100
> libavfilter 10. 6.100 / 10. 6.100
> libswscale 8. 4.100 / 8. 4.100
> libswresample 5. 4.100 / 5. 4.100
> libpostproc 58. 4.100 / 58. 4.100
> Splitting the commandline.
> Reading option '-loglevel' ... matched as option 'loglevel' (set logging
> level) with argument 'debug'.
> Reading option '-init_hw_device' ... matched as option 'init_hw_device'
> (initialise hardware device) with argument
> 'vulkan=vk:0,debug=0,disable_multiplane=1'.
> Reading option '-f' ... matched as option 'f' (force container format
> (auto-detected otherwise)) with argument 'lavfi'.
> Reading option '-i' ... matched as input url with argument
> 'color=red:s=3840x2160'.
> Reading option '-vf' ... matched as option 'vf' (alias for -filter:v
> (apply filters to video streams)) with argument
> 'hwupload,libplacebo,hwdownload,format=yuv420p'.
> Reading option '-f' ... matched as option 'f' (force container format
> (auto-detected otherwise)) with argument 'null'.
> Reading option '-' ... matched as output url.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option loglevel (set logging level) with argument debug.
> Applying option init_hw_device (initialise hardware device) with argument
> vulkan=vk:0,debug=0,disable_multiplane=1.
> [AVHWDeviceContext @ 0x62487096e280] Supported layers:
> [AVHWDeviceContext @ 0x62487096e280] VK_LAYER_MESA_device_select
> [AVHWDeviceContext @ 0x62487096e280] VK_LAYER_MESA_overlay
> [AVHWDeviceContext @ 0x62487096e280] Using instance extension
> VK_KHR_portability_enumeration
> [AVHWDeviceContext @ 0x62487096e280] GPU listing:
> [AVHWDeviceContext @ 0x62487096e280] 0: Intel(R) Graphics (RPL-P)
> (integrated) (0xa7a0)
> [AVHWDeviceContext @ 0x62487096e280] Device 0 selected: Intel(R) Graphics
> (RPL-P) (integrated) (0xa7a0)
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_push_descriptor
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_EXT_descriptor_buffer
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_EXT_physical_device_drm
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_EXT_shader_atomic_float
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_cooperative_matrix
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_maintenance1
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_external_memory_fd
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_EXT_external_memory_dma_buf
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_EXT_image_drm_format_modifier
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_external_semaphore_fd
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_EXT_external_memory_host
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_queue
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_encode_queue
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_decode_queue
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_encode_h264
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_decode_h264
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_encode_h265
> [AVHWDeviceContext @ 0x62487096e280] Using device extension
> VK_KHR_video_decode_h265
> [AVHWDeviceContext @ 0x62487096e280] Queue families:
> [AVHWDeviceContext @ 0x62487096e280] 0: graphics compute transfer
> sparse protected (queues: 1)
> [AVHWDeviceContext @ 0x62487096e280] 1: encode decode (queues: 2)
> [AVHWDeviceContext @ 0x62487096e280] Using device: Intel(R) Graphics
> (RPL-P)
> [AVHWDeviceContext @ 0x62487096e280] Alignments:
> [AVHWDeviceContext @ 0x62487096e280]
> optimalBufferCopyRowPitchAlignment: 128
> [AVHWDeviceContext @ 0x62487096e280] minMemoryMapAlignment:
> 4096
> [AVHWDeviceContext @ 0x62487096e280] nonCoherentAtomSize:
> 64
> [AVHWDeviceContext @ 0x62487096e280] minImportedHostPointerAlignment:
> 4096
> [AVHWDeviceContext @ 0x62487096e280] Using queue family 0 (queues: 1) for
> graphics compute transfers
> [AVHWDeviceContext @ 0x62487096e280] Using queue family 1 (queues: 2) for
> encode decode
> Successfully parsed a group of options.
> Parsing a group of options: input url color=red:s=3840x2160.
> Applying option f (force container format (auto-detected otherwise)) with
> argument lavfi.
> Successfully parsed a group of options.
> Opening an input file: color=red:s=3840x2160.
> [AVFilterGraph @ 0x6248709d2b00] Setting 'color' to value 'red'
> [AVFilterGraph @ 0x6248709d2b00] Setting 's' to value '3840x2160'
> detected 20 logical cores
> [Parsed_color_0 @ 0x624870a6b3c0] size:3840x2160 rate:25/1
> duration:-1.000000 sar:1/1
> [AVFilterGraph @ 0x6248709d2b00] query_formats: 2 queried, 3 merged, 0
> already done, 0 delayed
> [lavfi @ 0x62487097fb00] All info found
> Input #0, lavfi, from 'color=red:s=3840x2160':
> Duration: N/A, start: 0.000000, bitrate: N/A
> Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame,
> yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 25 tbn
> Successfully opened the file.
> Parsing a group of options: output url -.
> Applying option vf (alias for -filter:v (apply filters to video streams))
> with argument hwupload,libplacebo,hwdownload,format=yuv420p.
> Applying option f (force container format (auto-detected otherwise)) with
> argument null.
> Successfully parsed a group of options.
> Opening an output file: -.
> [out#0/null @ 0x624870a70880] No explicit maps, mapping streams
> automatically...
> [vost#0:0/wrapped_avframe @ 0x624870a71380] Created video stream from
> input stream 0:0
> [AVFilterGraph @ 0x624870a728c0] Setting 'pix_fmts' to value 'yuv420p'
> [libplacebo @ 0x624870a734c0] Initialized libplacebo v7.349.0
> (v7.349.0-15-g756220c3) (API v349)
> Successfully opened the file.
> Stream mapping:
> Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe
> (native))
> [vost#0:0/wrapped_avframe @ 0x624870a71380] Starting thread...
> [vf#0:0 @ 0x624870a72300] Starting thread...
> [vist#0:0/wrapped_avframe @ 0x624870a70040] [dec:wrapped_avframe @
> 0x624870a73940] Starting thread...
> [in#0/lavfi @ 0x62487097f8c0] Starting thread...
> Press [q] to stop, [?] for help
> [AVFilterGraph @ 0x7d4ffc0011c0] Setting 'pix_fmts' to value 'yuv420p'
> [libplacebo @ 0x7d4ffc0046c0] Initialized libplacebo v7.349.0
> (v7.349.0-15-g756220c3) (API v349)
> [graph -1 input from stream 0:0 @ 0x7d4ffc009fc0] w:3840 h:2160
> pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 csp:unknown range:unknown
> [libplacebo @ 0x7d4ffc0046c0] Imported vulkan device properties:
> [libplacebo @ 0x7d4ffc0046c0] Device Name: Intel(R) Graphics (RPL-P)
> [libplacebo @ 0x7d4ffc0046c0] Device ID: 8086:a7a0
> [libplacebo @ 0x7d4ffc0046c0] Device UUID:
> 86:80:A0:A7:04:00:00:00:00:02:00:00:00:00:00:00
> [libplacebo @ 0x7d4ffc0046c0] Driver version: 6002063
> [libplacebo @ 0x7d4ffc0046c0] API version: 1.3.296
> [libplacebo @ 0x7d4ffc0046c0] Restricting API version to 1.3.0... new
> version 1.3.0
> [libplacebo @ 0x7d4ffc0046c0] Missing device feature: hostQueryReset
> [libplacebo @ 0x7d4ffc0046c0] Imported Vulkan device was not created with
> all required features!
> [libplacebo @ 0x7d4ffc0046c0] Failed importing vulkan device
> [libplacebo @ 0x7d4ffc0046c0] Failed importing Vulkan device!
> [Parsed_libplacebo_1 @ 0x7d4ffc004580] Query format failed for
> 'Parsed_libplacebo_1': Generic error in an external library
> [vf#0:0 @ 0x624870a72300] Error reinitializing filters!
> [vf#0:0 @ 0x624870a72300] Task finished with error code: -542398533
> (Generic error in an external library)
> [vf#0:0 @ 0x624870a72300] Terminating thread with return code -542398533
> (Generic error in an external library)
> [vist#0:0/wrapped_avframe @ 0x624870a70040] [dec:wrapped_avframe @
> 0x624870a73940] Decoder returned EOF, finishing
> [vost#0:0/wrapped_avframe @ 0x624870a71380] [enc:wrapped_avframe @
> 0x624870a71cc0] Encoder thread received EOF
> [vost#0:0/wrapped_avframe @ 0x624870a71380] [enc:wrapped_avframe @
> 0x624870a71cc0] Could not open encoder before EOF
> [vost#0:0/wrapped_avframe @ 0x624870a71380] Task finished with error
> code: -22 (Invalid argument)
> [vost#0:0/wrapped_avframe @ 0x624870a71380] Terminating thread with
> return code -22 (Invalid argument)
> [vist#0:0/wrapped_avframe @ 0x624870a70040] [dec:wrapped_avframe @
> 0x624870a73940] Terminating thread with return code 0 (success)
> [vist#0:0/wrapped_avframe @ 0x624870a70040] All consumers of this stream
> are done
> [in#0/lavfi @ 0x62487097f8c0] All consumers are done
> [in#0/lavfi @ 0x62487097f8c0] Terminating thread with return code 0
> (success)
> [out#0/null @ 0x624870a70880] 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
> [in#0/lavfi @ 0x62487097f8c0] Input file #0 (color=red:s=3840x2160):
> [in#0/lavfi @ 0x62487097f8c0] Input stream #0:0 (video): 19 packets
> read (8360 bytes); 10 frames decoded; 0 decode errors;
> [in#0/lavfi @ 0x62487097f8c0] Total: 19 packets (8360 bytes) demuxed
> Conversion failed!
> }}}
>
> Omitting {{{libplacebo}}} from the filter chain(s) allows the command(s)
> above to execute correctly.
>
> The `libplacebo` filter will also fail to initialize regardless of the
> flags passed to the underlying Vulkan HWContext, as shown in this trivial
> Vulkan video encode example below:
>
> {{{
> ffmpeg -loglevel debug -init_hw_device vulkan=vk:0 -filter_hw_device vk
> -f lavfi -i testsrc=duration=300:size=1920x1080:rate=60,format=nv12 -vf
> "libplacebo" -c:v h264_vulkan -b:v 3000k -f null /dev/null -y
> }}}
>
> Which will throw up identical error logs as the command lines above:
>
> {{{
> [libplacebo @ 0x7ecdcc0044c0] Restricting API version to 1.3.0... new
> version 1.3.0
> [libplacebo @ 0x7ecdcc0044c0] Missing device feature: hostQueryReset
> [libplacebo @ 0x7ecdcc0044c0] Imported Vulkan device was not created with
> all required features!
> [libplacebo @ 0x7ecdcc0044c0] Failed importing vulkan device
> [libplacebo @ 0x7ecdcc0044c0] Failed importing Vulkan device!
> [Parsed_libplacebo_0 @ 0x7ecdcc004380] Query format failed for
> 'Parsed_libplacebo_0': Generic error in an external library
> [vf#0:0 @ 0x5822ecd31700] Error reinitializing filters!
> [vf#0:0 @ 0x5822ecd31700] Task finished with error code: -542398533
> (Generic error in an external library)
> [vf#0:0 @ 0x5822ecd31700] Terminating thread with return code -542398533
> (Generic error in an external library)
> }}}
>
> This regression is quite recent because I was able to launch the same
> pipeline(s) when reporting on https://trac.ffmpeg.org/ticket/11219
New description:
**Summary of the bug:**
Inserting `libplacebo` at any point in the filter chain **with OR
without** Vulkan en/decoding enabled results in an initialization failure,
as shown below.
Derived Vulkan hardware contexts, be it via `hwmap`,
`hwupload=derive_device=vulkan` and
`-init_hw_device=vulkan:vk@{primary_device}` followed by {{{libplacebo}}}
in the filter chain(s) also results in failure.
This is also reproducible as-is on Windows, with ffmpeg builds derived
from master branch's git tip, with identical parameters and results as on
Linux.
**How to reproduce:**
**(a). With NVIDIA:**
{{{
ffmpeg -loglevel debug -init_hw_device
"vulkan=vk:0,debug=0,disable_multiplane=1" -f lavfi -i
color=red:s=3840x2160 -vf hwupload,libplacebo,hwdownload,format=yuv420p -f
null -
}}}
Results in:
{{{
ffmpeg version N-117372-g6871fd3170 Copyright (c) 2000-2024 the FFmpeg
developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --libdir=/usr/local/lib --enable-shared --disable-debug
--disable-doc --disable-htmlpages --disable-manpages --disable-podpages
--disable-txtpages --disable-ffplay --enable-alsa --enable-cuvid --enable-
libplacebo --enable-librav1e --enable-libdav1d --enable-libshaderc
--enable-libv4l2 --enable-libvmaf --enable-libvpl --enable-libxml2
--enable-nvdec --enable-nvenc --enable-cuda-llvm --nvcc=clang --nvccflags
='--cuda-gpu-arch=sm_60 -O2' --enable-opencl --enable-vaapi --enable-vdpau
--enable-version3 --enable-vulkan --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig
--enable-libfreetype --enable-libvidstab --enable-libharfbuzz --enable-
libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx265 --enable-libsvtav1
--enable-libx264 --enable-nonfree --enable-openssl --enable-lzma --enable-
zlib --enable-gmp --enable-libfdk_aac --enable-postproc --enable-libzmq
--enable-lv2 --enable-ladspa --enable-libxeve --enable-libxevd --enable-
liblcevc-dec --enable-libzvbi --enable-decklink --enable-libklvanc
--enable-libopenjpeg --enable-libjxl --enable-libzimg --enable-
pocketsphinx --enable-libmysofa --enable-libquirc --enable-libqrencode
--enable-libkvazaar --enable-libaom --enable-libsrt --enable-librist
--extra-libs='-lpthread -lm -lz -ldl' --extra-cflags=-I/tmp/workdir
/Blackmagic-SDK-14/Linux/include/
libavutil 59. 41.100 / 59. 41.100
libavcodec 61. 21.100 / 61. 21.100
libavformat 61. 9.100 / 61. 9.100
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 6.100 / 10. 6.100
libswscale 8. 4.100 / 8. 4.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device'
(initialise hardware device) with argument
'vulkan=vk:0,debug=0,disable_multiplane=1'.
Reading option '-f' ... matched as option 'f' (force container format
(auto-detected otherwise)) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument
'color=red:s=3840x2160'.
Reading option '-vf' ... matched as option 'vf' (alias for -filter:v
(apply filters to video streams)) with argument
'hwupload,libplacebo,hwdownload,format=yuv420p'.
Reading option '-f' ... matched as option 'f' (force container format
(auto-detected otherwise)) with argument 'null'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument
vulkan=vk:0,debug=0,disable_multiplane=1.
[AVHWDeviceContext @ 0x620714ae9280] Supported layers:
[AVHWDeviceContext @ 0x620714ae9280] VK_LAYER_NV_optimus
[AVHWDeviceContext @ 0x620714ae9280] VK_LAYER_MESA_device_select
[AVHWDeviceContext @ 0x620714ae9280] VK_LAYER_MESA_overlay
[AVHWDeviceContext @ 0x620714ae9280] Using instance extension
VK_KHR_portability_enumeration
[AVHWDeviceContext @ 0x620714ae9280] GPU listing:
[AVHWDeviceContext @ 0x620714ae9280] 0: NVIDIA GeForce RTX 4060 Laptop
GPU (discrete) (0x28a0)
[AVHWDeviceContext @ 0x620714ae9280] Device 0 selected: NVIDIA GeForce RTX
4060 Laptop GPU (discrete) (0x28a0)
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_descriptor_buffer
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_physical_device_drm
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_shader_atomic_float
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_cooperative_matrix
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_NV_optical_flow
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_shader_object
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_maintenance1
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_queue
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_encode_queue
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_decode_queue
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_encode_h264
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_decode_h264
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_encode_h265
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_decode_h265
[AVHWDeviceContext @ 0x620714ae9280] Using device extension
VK_KHR_video_decode_av1
[AVHWDeviceContext @ 0x620714ae9280] Queue families:
[AVHWDeviceContext @ 0x620714ae9280] 0: graphics compute transfer
sparse (queues: 16)
[AVHWDeviceContext @ 0x620714ae9280] 1: transfer sparse (queues: 2)
[AVHWDeviceContext @ 0x620714ae9280] 2: compute transfer sparse
(queues: 8)
[AVHWDeviceContext @ 0x620714ae9280] 3: transfer decode sparse
(queues: 1)
[AVHWDeviceContext @ 0x620714ae9280] 4: transfer encode sparse
(queues: 1)
[AVHWDeviceContext @ 0x620714ae9280] 5: transfer sparse optical_flow
(queues: 1)
[AVHWDeviceContext @ 0x620714ae9280] Using device: NVIDIA GeForce RTX 4060
Laptop GPU
[AVHWDeviceContext @ 0x620714ae9280] Alignments:
[AVHWDeviceContext @ 0x620714ae9280]
optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x620714ae9280] minMemoryMapAlignment:
64
[AVHWDeviceContext @ 0x620714ae9280] nonCoherentAtomSize:
64
[AVHWDeviceContext @ 0x620714ae9280] minImportedHostPointerAlignment:
4096
[AVHWDeviceContext @ 0x620714ae9280] Using queue family 0 (queues: 16) for
graphics
[AVHWDeviceContext @ 0x620714ae9280] Using queue family 2 (queues: 8) for
compute
[AVHWDeviceContext @ 0x620714ae9280] Using queue family 1 (queues: 2) for
transfers
[AVHWDeviceContext @ 0x620714ae9280] Using queue family 3 (queues: 1) for
decode
[AVHWDeviceContext @ 0x620714ae9280] Using queue family 4 (queues: 1) for
encode
Successfully parsed a group of options.
Parsing a group of options: input url color=red:s=3840x2160.
Applying option f (force container format (auto-detected otherwise)) with
argument lavfi.
Successfully parsed a group of options.
Opening an input file: color=red:s=3840x2160.
[AVFilterGraph @ 0x6207181681c0] Setting 'color' to value 'red'
[AVFilterGraph @ 0x6207181681c0] Setting 's' to value '3840x2160'
detected 20 logical cores
[Parsed_color_0 @ 0x62071816b600] size:3840x2160 rate:25/1
duration:-1.000000 sar:1/1
[AVFilterGraph @ 0x6207181681c0] query_formats: 2 queried, 3 merged, 0
already done, 0 delayed
[lavfi @ 0x620718167980] All info found
Input #0, lavfi, from 'color=red:s=3840x2160':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame,
yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
Parsing a group of options: output url -.
Applying option vf (alias for -filter:v (apply filters to video streams))
with argument hwupload,libplacebo,hwdownload,format=yuv420p.
Applying option f (force container format (auto-detected otherwise)) with
argument null.
Successfully parsed a group of options.
Opening an output file: -.
[out#0/null @ 0x620715169480] No explicit maps, mapping streams
automatically...
[vost#0:0/wrapped_avframe @ 0x620715169f80] Created video stream from
input stream 0:0
[AVFilterGraph @ 0x62071516b4c0] Setting 'pix_fmts' to value 'yuv420p'
[libplacebo @ 0x62071516c280] Initialized libplacebo v7.349.0
(v7.349.0-15-g756220c3) (API v349)
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe
(native))
[vost#0:0/wrapped_avframe @ 0x620715169f80] Starting thread...
[vf#0:0 @ 0x62071516af80] Starting thread...
[vist#0:0/wrapped_avframe @ 0x620715167c40] [dec:wrapped_avframe @
0x62071516c6c0] Starting thread...
[in#0/lavfi @ 0x620718167640] Starting thread...
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x7e50980011c0] Setting 'pix_fmts' to value 'yuv420p'
[libplacebo @ 0x7e5098004e40] Initialized libplacebo v7.349.0
(v7.349.0-15-g756220c3) (API v349)
[graph -1 input from stream 0:0 @ 0x7e509800a740] w:3840 h:2160
pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 csp:unknown range:unknown
[libplacebo @ 0x7e5098004e40] Imported vulkan device properties:
[libplacebo @ 0x7e5098004e40] Device Name: NVIDIA GeForce RTX 4060
Laptop GPU
[libplacebo @ 0x7e5098004e40] Device ID: 10de:28a0
[libplacebo @ 0x7e5098004e40] Device UUID:
46:B0:D7:C4:58:6B:CE:2C:FF:BB:05:7E:5D:96:AB:7E
[libplacebo @ 0x7e5098004e40] Driver version: 8c08c0c0
[libplacebo @ 0x7e5098004e40] API version: 1.3.280
[libplacebo @ 0x7e5098004e40] Restricting API version to 1.3.0... new
version 1.3.0
[libplacebo @ 0x7e5098004e40] Missing device feature: hostQueryReset
[libplacebo @ 0x7e5098004e40] Imported Vulkan device was not created with
all required features!
[libplacebo @ 0x7e5098004e40] Failed importing vulkan device
[libplacebo @ 0x7e5098004e40] Failed importing Vulkan device!
[Parsed_libplacebo_1 @ 0x7e5098004d00] Query format failed for
'Parsed_libplacebo_1': Generic error in an external library
[vf#0:0 @ 0x62071516af80] Error reinitializing filters!
[vf#0:0 @ 0x62071516af80] Task finished with error code: -542398533
(Generic error in an external library)
[vf#0:0 @ 0x62071516af80] Terminating thread with return code -542398533
(Generic error in an external library)
[vost#0:0/wrapped_avframe @ 0x620715169f80] [enc:wrapped_avframe @
0x62071516a940] Encoder thread received EOF
[vost#0:0/wrapped_avframe @ 0x620715169f80] [enc:wrapped_avframe @
0x62071516a940] Could not open encoder before EOF
[vist#0:0/wrapped_avframe @ 0x620715167c40] [dec:wrapped_avframe @
0x62071516c6c0] Decoder returned EOF, finishing
[vist#0:0/wrapped_avframe @ 0x620715167c40] [dec:wrapped_avframe @
0x62071516c6c0] Terminating thread with return code 0 (success)
[vost#0:0/wrapped_avframe @ 0x620715169f80] Task finished with error code:
-22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x620715169f80] Terminating thread with return
code -22 (Invalid argument)
[vist#0:0/wrapped_avframe @ 0x620715167c40] All consumers of this stream
are done
[in#0/lavfi @ 0x620718167640] All consumers are done
[in#0/lavfi @ 0x620718167640] Terminating thread with return code 0
(success)
[out#0/null @ 0x620715169480] 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
[in#0/lavfi @ 0x620718167640] Input file #0 (color=red:s=3840x2160):
[in#0/lavfi @ 0x620718167640] Input stream #0:0 (video): 19 packets read
(8360 bytes); 10 frames decoded; 0 decode errors;
[in#0/lavfi @ 0x620718167640] Total: 19 packets (8360 bytes) demuxed
Conversion failed!
}}}
**(b). Replicated on an Intel setup:**
An identical command as before:
{{{
ffmpeg -loglevel debug -init_hw_device
"vulkan=vk:0,debug=0,disable_multiplane=1" -f lavfi -i
color=red:s=3840x2160 -vf hwupload,libplacebo,hwdownload,format=yuv420p -f
null -
}}}
**Output:**
{{{
ffmpeg version N-117372-g6871fd3170 Copyright (c) 2000-2024 the FFmpeg
developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --libdir=/usr/local/lib --enable-shared --disable-debug
--disable-doc --disable-htmlpages --disable-manpages --disable-podpages
--disable-txtpages --disable-ffplay --enable-alsa --enable-cuvid --enable-
libplacebo --enable-librav1e --enable-libdav1d --enable-libshaderc
--enable-libv4l2 --enable-libvmaf --enable-libvpl --enable-libxml2
--enable-nvdec --enable-nvenc --enable-cuda-llvm --nvcc=clang --nvccflags
='--cuda-gpu-arch=sm_60 -O2' --enable-opencl --enable-vaapi --enable-vdpau
--enable-version3 --enable-vulkan --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig
--enable-libfreetype --enable-libvidstab --enable-libharfbuzz --enable-
libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx265 --enable-libsvtav1
--enable-libx264 --enable-nonfree --enable-openssl --enable-lzma --enable-
zlib --enable-gmp --enable-libfdk_aac --enable-postproc --enable-libzmq
--enable-lv2 --enable-ladspa --enable-libxeve --enable-libxevd --enable-
liblcevc-dec --enable-libzvbi --enable-decklink --enable-libklvanc
--enable-libopenjpeg --enable-libjxl --enable-libzimg --enable-
pocketsphinx --enable-libmysofa --enable-libquirc --enable-libqrencode
--enable-libkvazaar --enable-libaom --enable-libsrt --enable-librist
--extra-libs='-lpthread -lm -lz -ldl' --extra-cflags=-I/tmp/workdir
/Blackmagic-SDK-14/Linux/include/
libavutil 59. 41.100 / 59. 41.100
libavcodec 61. 21.100 / 61. 21.100
libavformat 61. 9.100 / 61. 9.100
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 6.100 / 10. 6.100
libswscale 8. 4.100 / 8. 4.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device'
(initialise hardware device) with argument
'vulkan=vk:0,debug=0,disable_multiplane=1'.
Reading option '-f' ... matched as option 'f' (force container format
(auto-detected otherwise)) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument
'color=red:s=3840x2160'.
Reading option '-vf' ... matched as option 'vf' (alias for -filter:v
(apply filters to video streams)) with argument
'hwupload,libplacebo,hwdownload,format=yuv420p'.
Reading option '-f' ... matched as option 'f' (force container format
(auto-detected otherwise)) with argument 'null'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument
vulkan=vk:0,debug=0,disable_multiplane=1.
[AVHWDeviceContext @ 0x62487096e280] Supported layers:
[AVHWDeviceContext @ 0x62487096e280] VK_LAYER_MESA_device_select
[AVHWDeviceContext @ 0x62487096e280] VK_LAYER_MESA_overlay
[AVHWDeviceContext @ 0x62487096e280] Using instance extension
VK_KHR_portability_enumeration
[AVHWDeviceContext @ 0x62487096e280] GPU listing:
[AVHWDeviceContext @ 0x62487096e280] 0: Intel(R) Graphics (RPL-P)
(integrated) (0xa7a0)
[AVHWDeviceContext @ 0x62487096e280] Device 0 selected: Intel(R) Graphics
(RPL-P) (integrated) (0xa7a0)
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_EXT_descriptor_buffer
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_EXT_physical_device_drm
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_EXT_shader_atomic_float
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_cooperative_matrix
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_maintenance1
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_queue
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_encode_queue
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_decode_queue
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_encode_h264
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_decode_h264
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_encode_h265
[AVHWDeviceContext @ 0x62487096e280] Using device extension
VK_KHR_video_decode_h265
[AVHWDeviceContext @ 0x62487096e280] Queue families:
[AVHWDeviceContext @ 0x62487096e280] 0: graphics compute transfer
sparse protected (queues: 1)
[AVHWDeviceContext @ 0x62487096e280] 1: encode decode (queues: 2)
[AVHWDeviceContext @ 0x62487096e280] Using device: Intel(R) Graphics
(RPL-P)
[AVHWDeviceContext @ 0x62487096e280] Alignments:
[AVHWDeviceContext @ 0x62487096e280]
optimalBufferCopyRowPitchAlignment: 128
[AVHWDeviceContext @ 0x62487096e280] minMemoryMapAlignment:
4096
[AVHWDeviceContext @ 0x62487096e280] nonCoherentAtomSize:
64
[AVHWDeviceContext @ 0x62487096e280] minImportedHostPointerAlignment:
4096
[AVHWDeviceContext @ 0x62487096e280] Using queue family 0 (queues: 1) for
graphics compute transfers
[AVHWDeviceContext @ 0x62487096e280] Using queue family 1 (queues: 2) for
encode decode
Successfully parsed a group of options.
Parsing a group of options: input url color=red:s=3840x2160.
Applying option f (force container format (auto-detected otherwise)) with
argument lavfi.
Successfully parsed a group of options.
Opening an input file: color=red:s=3840x2160.
[AVFilterGraph @ 0x6248709d2b00] Setting 'color' to value 'red'
[AVFilterGraph @ 0x6248709d2b00] Setting 's' to value '3840x2160'
detected 20 logical cores
[Parsed_color_0 @ 0x624870a6b3c0] size:3840x2160 rate:25/1
duration:-1.000000 sar:1/1
[AVFilterGraph @ 0x6248709d2b00] query_formats: 2 queried, 3 merged, 0
already done, 0 delayed
[lavfi @ 0x62487097fb00] All info found
Input #0, lavfi, from 'color=red:s=3840x2160':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame,
yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
Parsing a group of options: output url -.
Applying option vf (alias for -filter:v (apply filters to video streams))
with argument hwupload,libplacebo,hwdownload,format=yuv420p.
Applying option f (force container format (auto-detected otherwise)) with
argument null.
Successfully parsed a group of options.
Opening an output file: -.
[out#0/null @ 0x624870a70880] No explicit maps, mapping streams
automatically...
[vost#0:0/wrapped_avframe @ 0x624870a71380] Created video stream from
input stream 0:0
[AVFilterGraph @ 0x624870a728c0] Setting 'pix_fmts' to value 'yuv420p'
[libplacebo @ 0x624870a734c0] Initialized libplacebo v7.349.0
(v7.349.0-15-g756220c3) (API v349)
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe
(native))
[vost#0:0/wrapped_avframe @ 0x624870a71380] Starting thread...
[vf#0:0 @ 0x624870a72300] Starting thread...
[vist#0:0/wrapped_avframe @ 0x624870a70040] [dec:wrapped_avframe @
0x624870a73940] Starting thread...
[in#0/lavfi @ 0x62487097f8c0] Starting thread...
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x7d4ffc0011c0] Setting 'pix_fmts' to value 'yuv420p'
[libplacebo @ 0x7d4ffc0046c0] Initialized libplacebo v7.349.0
(v7.349.0-15-g756220c3) (API v349)
[graph -1 input from stream 0:0 @ 0x7d4ffc009fc0] w:3840 h:2160
pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 csp:unknown range:unknown
[libplacebo @ 0x7d4ffc0046c0] Imported vulkan device properties:
[libplacebo @ 0x7d4ffc0046c0] Device Name: Intel(R) Graphics (RPL-P)
[libplacebo @ 0x7d4ffc0046c0] Device ID: 8086:a7a0
[libplacebo @ 0x7d4ffc0046c0] Device UUID:
86:80:A0:A7:04:00:00:00:00:02:00:00:00:00:00:00
[libplacebo @ 0x7d4ffc0046c0] Driver version: 6002063
[libplacebo @ 0x7d4ffc0046c0] API version: 1.3.296
[libplacebo @ 0x7d4ffc0046c0] Restricting API version to 1.3.0... new
version 1.3.0
[libplacebo @ 0x7d4ffc0046c0] Missing device feature: hostQueryReset
[libplacebo @ 0x7d4ffc0046c0] Imported Vulkan device was not created with
all required features!
[libplacebo @ 0x7d4ffc0046c0] Failed importing vulkan device
[libplacebo @ 0x7d4ffc0046c0] Failed importing Vulkan device!
[Parsed_libplacebo_1 @ 0x7d4ffc004580] Query format failed for
'Parsed_libplacebo_1': Generic error in an external library
[vf#0:0 @ 0x624870a72300] Error reinitializing filters!
[vf#0:0 @ 0x624870a72300] Task finished with error code: -542398533
(Generic error in an external library)
[vf#0:0 @ 0x624870a72300] Terminating thread with return code -542398533
(Generic error in an external library)
[vist#0:0/wrapped_avframe @ 0x624870a70040] [dec:wrapped_avframe @
0x624870a73940] Decoder returned EOF, finishing
[vost#0:0/wrapped_avframe @ 0x624870a71380] [enc:wrapped_avframe @
0x624870a71cc0] Encoder thread received EOF
[vost#0:0/wrapped_avframe @ 0x624870a71380] [enc:wrapped_avframe @
0x624870a71cc0] Could not open encoder before EOF
[vost#0:0/wrapped_avframe @ 0x624870a71380] Task finished with error code:
-22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x624870a71380] Terminating thread with return
code -22 (Invalid argument)
[vist#0:0/wrapped_avframe @ 0x624870a70040] [dec:wrapped_avframe @
0x624870a73940] Terminating thread with return code 0 (success)
[vist#0:0/wrapped_avframe @ 0x624870a70040] All consumers of this stream
are done
[in#0/lavfi @ 0x62487097f8c0] All consumers are done
[in#0/lavfi @ 0x62487097f8c0] Terminating thread with return code 0
(success)
[out#0/null @ 0x624870a70880] 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
[in#0/lavfi @ 0x62487097f8c0] Input file #0 (color=red:s=3840x2160):
[in#0/lavfi @ 0x62487097f8c0] Input stream #0:0 (video): 19 packets read
(8360 bytes); 10 frames decoded; 0 decode errors;
[in#0/lavfi @ 0x62487097f8c0] Total: 19 packets (8360 bytes) demuxed
Conversion failed!
}}}
Omitting {{{libplacebo}}} from the filter chain(s) allows the command(s)
above to execute correctly.
The `libplacebo` filter will also fail to initialize regardless of the
flags passed to the underlying Vulkan HWContext, as shown in this trivial
Vulkan video encode example below:
{{{
ffmpeg -loglevel debug -init_hw_device vulkan=vk:0 -filter_hw_device vk -f
lavfi -i testsrc=duration=300:size=1920x1080:rate=60,format=nv12 -vf
"libplacebo" -c:v h264_vulkan -b:v 3000k -f null /dev/null -y
}}}
Which will throw up identical error logs as the command lines above:
{{{
[libplacebo @ 0x7ecdcc0044c0] Restricting API version to 1.3.0... new
version 1.3.0
[libplacebo @ 0x7ecdcc0044c0] Missing device feature: hostQueryReset
[libplacebo @ 0x7ecdcc0044c0] Imported Vulkan device was not created with
all required features!
[libplacebo @ 0x7ecdcc0044c0] Failed importing vulkan device
[libplacebo @ 0x7ecdcc0044c0] Failed importing Vulkan device!
[Parsed_libplacebo_0 @ 0x7ecdcc004380] Query format failed for
'Parsed_libplacebo_0': Generic error in an external library
[vf#0:0 @ 0x5822ecd31700] Error reinitializing filters!
[vf#0:0 @ 0x5822ecd31700] Task finished with error code: -542398533
(Generic error in an external library)
[vf#0:0 @ 0x5822ecd31700] Terminating thread with return code -542398533
(Generic error in an external library)
}}}
This regression is quite recent because I was able to launch the same
pipeline(s) when reporting on https://trac.ffmpeg.org/ticket/11219
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11229#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list