[FFmpeg-user] libplacebo in 7.1.1 and vaapi decode/encode on rx550

Andrew Randrianasulu randrianasulu at gmail.com
Sat Apr 26 11:00:07 EEST 2025


I am trying to explore new world of Vulkan. Just compiled vulkan-sdk
1.4.304 and thus  ffmpeg 7.1.1 with libplacebo and vulkan
filters/hwaccels/encode.

Because Vulkan decode for some reason does not work on my AMD RX550
(polaris12) even with RADV_VIDEO_ENCODE=1 RADV_VIDEO_DECODE=1 I am
trying to make libplacebo's tonemap cooperate with vaapi

bash-5.1$ ./bin/ffmpeg711-vulkan  -init_hw_device vulkan  -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
  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 @ 0xb1ff740] 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
There are 2 hardware devices. device vaapi0 of type vaapi is picked
for filters by default. Set hardware device explicitly with the
filter_hw_device option if device vaapi0 is not usable for filters.
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 @ 0xb1fe380] Error reinitializing filters!
[vf#0:0 @ 0xb1fe380] Task finished with error code: -38 (Function not
implemented)
[vost#0:0/hevc_vulkan @ 0xb200200] Could not open encoder before EOF
[vost#0:0/hevc_vulkan @ 0xb200200] Task finished with error code: -22
(Invalid argument)
[vost#0:0/hevc_vulkan @ 0xb200200] Terminating thread with return code
-22 (Invalid argument)
[vf#0:0 @ 0xb1fe380] Terminating thread with return code -38 (Function
not implemented)
[out#0/avi @ 0xb1e8d80] 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!

ow!

And adding -filter_hw_device vulkan only result in

ash-5.1$ ./bin/ffmpeg711-vulkan  -init_hw_device vulkan
-filter_hw_device vulkan  -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
  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
Invalid filter device vulkan.
Failed to set value 'vulkan' for option 'filter_hw_device': Invalid argument
Error parsing global options: Invalid argument

Any idea how to proceed?


More information about the ffmpeg-user mailing list