[FFmpeg-user] Failed setup for format vulkan: hwaccel initialisation returned error for Arc A750

Dennis Mungai dmngaie at gmail.com
Wed Aug 14 02:59:09 EEST 2024


On Wed, 14 Aug 2024, 02:45 Terje J. Hanssen, <terjejhanssen at gmail.com>
wrote:

>
>
> Den 13.08.2024 19:40, skrev Dennis Mungai:
>
> On Tue, 13 Aug 2024 at 19:49, Andrew Randrianasulu <randrianasulu at gmail.com> <randrianasulu at gmail.com>
> wrote:
>
>
> вт, 13 авг. 2024 г., 19:46 Terje J. Hanssen <terjejhanssen at gmail.com> <terjejhanssen at gmail.com>:
>
>
> Hi,
>
> I try to test Vulkan h264 or h265 decoding according to test command athttps://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan
> ffmpeg -init_hw_device "vulkan=vk:0" -hwaccel vulkan
> -hwaccel_output_format vulkan -i INPUT -f null - -benchmark
>
> but get the following output error:
> [h264 @ 0x55952760cf40] Failed setup for format vulkan: hwaccel
> initialisation returned error.
> or
> [hevc @ 0x5580e96e8c80] Failed setup for format vulkan: hwaccel
> initialisation returned error.
>
> Any suggestion how to solve it?
>
>
> Honestly, no idea .. try ffmpeg matrix/irc channel or ffmpeg-user?
>
>
> This has to do with your input file. Your log indicates that you're
> attempting to decode 10-bit H.264, and from my suspicion, almost zero GPUs
> implement 10-bit H.264 decode.
> You can verify via vainfo's output to see the decoder limitation(s) for
> H.264 levels, etc.
> Try decoding any of the sample file from Kodi's H.264 sample collection:https://kodi.wiki/view/Samples#Codecs,_Framerates,_Black-levels_and_Subtitles
> And report back.
> _______________________________________________
>
>
>
> 1) Thank you for your suspicion regarding almost zero GPUs implement
> 10-bit H.264 decode.
> This is obviously true in my case, because when I tested a h264 8-bit
> yuv420p file, the hwaccel
> initialisation error was away. Full ffmpeg output report below using my
> own encoded input file.
> (Even with a h264 8-bit yuv422p input file ffmpeg did output the hwaccel
> initialisation error)
>
> 2) However Intel Arc A-series should support HEVC (H.265) 10-bit 4:2:0 and
> 10-bit 4:2:2 decode and encode formats  according to this page:
>
> https://www.intel.com/content/www/us/en/support/articles/000098345/graphics.html
> Also testing the corresponding input file in this format get the hwaccel
> initialisation error, see the full ffmpeg output below.
>
>
> What surprised me somewhat is relative little speed variation range
> between these expected GPU and CPU tests:
> 8-bit h264:  frame= 1780 fps=913 q=-0.0 Lsize=N/A time=00:01:11.20
> bitrate=N/A speed=36.5x
> 10-bit hevc: frame= 1779 fps=750 q=-0.0 Lsize=N/A time=00:01:11.16
> bitrate=N/A speed=  30x
>
> Possibly because a relative powerful CPU(?)
>
> inxi -CGz
> CPU:
>   Info: 12-core (8-mt/4-st) model: 12th Gen Intel Core i7-12700KF bits: 64
>     type: MST AMCP cache: L2: 12 MiB
>   Speed (MHz): avg: 800 min/max: 800/4900:5000:3800 cores: 1: 800 2: 800
>     3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12:
> 800
>     13: 800 14: 800 15: 800 16: 800 17: 800 18: 800 19: 800 20: 800
> Graphics:
>   Device-1: Intel DG2 [Arc A750] driver: i915 v: kernel
>   Device-2: Microdia Camera driver: snd-usb-audio,uvcvideo type: USB
>   Display: x11 server: X.org v: 1.21.1.12 with: Xwayland v: 24.1.1 driver:
>     X: loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915
>     resolution: 2560x1440~60Hz
>   API: OpenGL v: 4.6 vendor: intel mesa v: 24.1.2 renderer: Mesa Intel Arc
>     A750 Graphics (DG2)
>   API: Vulkan v: 1.3.290 drivers: N/A surfaces: xcb,xlib
>   API: EGL Message: EGL data requires eglinfo. Check --recommends.
>
> -------------
>
> vainfo | egrep 'H264|422_10'
>
> libva info: VA-API version 1.22.0
> libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
> libva info: Found init function __vaDriverInit_1_21
> libva info: va_openDriver() returns 0
>       VAProfileH264Main               :    VAEntrypointVLD
>       VAProfileH264Main               :    VAEntrypointEncSliceLP
>       VAProfileH264High               :    VAEntrypointVLD
>       VAProfileH264High               :    VAEntrypointEncSliceLP
>       VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
>       VAProfileH264ConstrainedBaseline:    VAEntrypointEncSliceLP
>       VAProfileHEVCMain422_10         :    VAEntrypointVLD
>       VAProfileHEVCMain422_10         :    VAEntrypointEncSliceLP
>
> ----------
>
> vulkaninfo | egrep 'H264|H265|HEVC'
>                 VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR
>                 VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR
>
> -------------
>
> 1)    72M    h264_8bit_yuv420p.mp4
>
> ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
> -hwaccel_output_format vulkan -i h264_8bit_yuv420p.mp4 -f null - -benchmark
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'h264_8bit_yuv420p.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf61.1.100
>   Duration: 00:01:11.20, start: 0.000000, bitrate: 8464 kb/s
>   Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
> yuvj420p(pc, smpte170m/unknown/unknown, top first), 1920x1080 [SAR 1:1 DAR
> 16:9], 8462 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
>       Metadata:
>         handler_name    : VideoHandler
>         vendor_id       : [0][0][0][0]
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
> Press [q] to stop, [?] for help
> Output #0, null, to 'pipe:':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf61.1.100
>   Stream #0:0(und): Video: wrapped_avframe, vulkan(pc,
> smpte170m/unknown/unknown, top coded first (swapped)), 1920x1080 [SAR 1:1
> 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.3.100 wrapped_avframe
> [out#0/null @ 0x55e45d48af40] video:765KiB audio:0KiB subtitle:0KiB other
> streams:0KiB global headers:0KiB muxing overhead: unknown
> frame= 1780 fps=913 q=-0.0 Lsize=N/A time=00:01:11.20 bitrate=N/A
> speed=36.5x
> bench: utime=0.589s stime=0.522s rtime=1.950s
> bench: maxrss=217780KiB
>
> --------------
>
> 2) 23M    h265_yuv422p10le_SR.mp4
>
> ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
> -hwaccel_output_format vulkan -i h265_yuv422p10le_SR.mp4 -f null -
> -benchmark
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'h265_yuv422p10le_SR.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2mp41
>     encoder         : Lavf61.1.100
>   Duration: 00:01:11.16, start: 0.000000, bitrate: 2703 kb/s
>   Stream #0:0[0x1](und): Video: hevc (Rext) (hev1 / 0x31766568),
> yuv422p10le(pc, smpte170m/unknown/unknown, top coded first (swapped)),
> 1920x1080 [SAR 1:1 DAR 16:9], 2700 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
>       Metadata:
>         handler_name    : VideoHandler
>         vendor_id       : [0][0][0][0]
> Stream mapping:
>   Stream #0:0 -> #0:0 (hevc (native) -> wrapped_avframe (native))
> Press [q] to stop, [?] for help
> ** [hevc @ 0x55edf209fa40] Failed setup for format vulkan: hwaccel
> initialisation returned error.
> ** [hevc @ 0x55edf209fa40] Unsupported film grain parameters. Ignoring
> film grain.
> Output #0, null, to 'pipe:':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2mp41
>     encoder         : Lavf61.1.100
>   Stream #0:0(und): Video: wrapped_avframe, yuv422p10le(pc,
> smpte170m/unknown/unknown, progressive), 1920x1080 [SAR 1:1 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.3.100 wrapped_avframe
> [out#0/null @ 0x55edf207ff40] video:764KiB audio:0KiB subtitle:0KiB other
> streams:0KiB global headers:0KiB muxing overhead: unknown
> frame= 1779 fps=750 q=-0.0 Lsize=N/A time=00:01:11.16 bitrate=N/A speed=
> 30x
> bench: utime=15.892s stime=0.188s rtime=2.371s
> bench: maxrss=411104KiB
>


It seems that as implemented, Vulkan decoding is definitely failing with
interlaced HEVC video, regardless of the underlying pixel format.

The file failing on your end is interlaced HEVC, see h265_yuv422p10le_SR.mp4


More information about the ffmpeg-user mailing list