[FFmpeg-user] Failed setup for format vulkan: hwaccel initialisation returned error for Arc A750
Greg Oliver
oliver.greg at gmail.com
Wed Aug 21 23:31:31 EEST 2024
On Wed, Aug 21, 2024 at 2:41 PM Terje J. Hanssen
<terjejhanssen at gmail.com> wrote:
>
>
>
> Den 15.08.2024 20:29, skrev Terje J. Hanssen:
> >
> >
> > tor. 15. aug. 2024, 13:27 skrev Wang, Fei W <fei.w.wang at intel.com>:
> >
> > On Wed, 2024-08-14 at 22:43 +0300, Dennis Mungai wrote:
> > > On Wed, 14 Aug 2024 at 15:27, Terje J. Hanssen
> > > <terjejhanssen at gmail.com> wrote:
> > > >
> > > >
> > > > Den 14.08.2024 14:22, skrev Dennis Mungai:
> > > >
> > > > > On Wed, Aug 14, 2024, 15:15 Terje J. Hanssen
> > > > > <terjejhanssen at gmail.com> wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > > Den 14.08.2024 02:05, skrev Dennis Mungai:
> > > > > >
> > > > > > > On Wed, 14 Aug 2024, 02:59 Dennis Mungai,
> > <dmngaie at gmail.com>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > 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>
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > вт, 13 авг. 2024 г., 19:46 Terje J. Hanssen
> > > > > > > > > > > <terjejhanssen at gmail.com>:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > Hi,
> > > > > > > > > > > >
> > > > > > > > > > > > I try to test Vulkan h264 or h265 decoding
> > > > > > > > > > > > according to test command at
> > > > > > > > > > > > https://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,_Blac
> > > > > > > > > > k-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.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > .......snip
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > > -------------
> > > > > > > > >
> > .....snip
> > > > > > > > > --------------
> > > > > > > > >
> > > > > > > > > 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
> > > > > > > >
> > > > > > >
> > > > > > > This ticket may also be relevant, interlaced HEVC
> > encodes are
> > > > > > > quite rare out here and may be non-spec compliant.
> > > > > > >
> > > > > > ======================
> > > > > >
> > > > > > Good points.
> > > > > >
> > > > > > My original ProRes422 HQ source input file before encoding to
> > > > > > HEVC using CinelerraGG/FFmpeg, was a in a valid HD
> > > > > > 1920x1080i25 format.
> > > > > > I also had a look at the available ffmpeg pixel formats:
> > > > > >
> > > > > > ffmpeg -hide_banner -h encoder=hevc | grep yuv422p10
> > > > > > Supported pixel formats: yuv420p yuvj420p yuv422p
> > yuvj422p
> > > > > > yuv444p yuvj444p gbrp yuv420p10le yuv422p10le yuv444p10le
> > > > > > gbrp10le yuv420p12le yuv422p12le yuv444p12le gbrp12le gray
> > > > > > gray10le gray12le
> > > > > >
> > > > > > ffmpeg -hide_banner -h full codecs=hevc | grep yuv422p10
> > > > > > yuv422p10 64 ..FV.......
> > > > > > yuv422p10 3 ..FV.......
> > > > > >
> > > > > > So now in a third attempt, I've tried to simply deinterlace
> > > > > > the H.265 file, but still get the ffmpeg Vulkan hwaccel
> > > > > > initialisation error.
> > > > > > I'm wondering if my deinterlace code line is correct, because
> > > > > > the deinterlaced output is smaller (halph the size) of the
> > > > > > input file.
> > > > > > I would have expected it larger(?)
> > > > > >
> > > > > > --------------
> > > > > >
> > > > > > ffmpeg -hide_banner -i h265_yuv422p10le_SR.mp4 -vf
> > > > > > yadif=parity=auto -c:v libx265 -c:a copy
> > > > > > h265_yuv422p10le_SR_deinterlaced.mp4
> > > > > > 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]
> > > > > > File 'h265_yuv422p10le_SR_deinterlaced.mp4' already exists.
> > > > > > Overwrite? [y/N] y
> > > > > > Stream mapping:
> > > > > > Stream #0:0 -> #0:0 (hevc (native) -> hevc (libx265))
> > > > > > Press [q] to stop, [?] for help
> > > > > > x265 [info]: HEVC encoder version
> > > > > > x265 [info]: build info [Linux][GCC 13.3.0][64 bit] 10bit
> > > > > > x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
> > SSSE3
> > > > > > SSE4.2 AVX FMA3 BMI2 AVX2
> > > > > > x265 [info]: Main 4:2:2 10 profile, Level-4 (Main tier)
> > > > > > x265 [info]: Thread pool created using 20 threads
> > > > > > x265 [info]: Slices : 1
> > > > > > x265 [info]: frame threads / pool features : 4 / wpp(17
> > > > > > rows)
> > > > > > x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
> > > > > > x265 [info]: Residual QT: max TU size, max depth : 32 / 1
> > > > > > inter / 1 intra
> > > > > > x265 [info]: ME / range / subpel / merge : hex / 57 /
> > > > > > 2 / 3
> > > > > > x265 [info]: Keyframe min / max / scenecut / bias : 25 / 250
> > > > > > / 40 / 5.00
> > > > > > x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
> > > > > > x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
> > > > > > x265 [info]: References / ref-limit cu / depth : 3 / off /
> > > > > > on
> > > > > > x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 /
> > > > > > 32 / 1
> > > > > > x265 [info]: Rate Control / qCompress : CRF-28.0 /
> > > > > > 0.60
> > > > > > x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1
> > > > > > signhide tmvp
> > > > > > x265 [info]: tools: b-intra strong-intra-smoothing lslices=6
> > > > > > deblock sao
> > > > > > Output #0, mp4, to 'h265_yuv422p10le_SR_deinterlaced.mp4':
> > > > > > Metadata:
> > > > > > major_brand : isom
> > > > > > minor_version : 512
> > > > > > compatible_brands: isomiso2mp41
> > > > > > encoder : Lavf61.1.100
> > > > > > Stream #0:0(und): Video: hevc (hev1 / 0x31766568),
> > > > > > yuv422p10le(pc, smpte170m/unknown/unknown, progressive),
> > > > > > 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn
> > > > > > (default)
> > > > > > Metadata:
> > > > > > handler_name : VideoHandler
> > > > > > vendor_id : [0][0][0][0]
> > > > > > encoder : Lavc61.3.100 libx265
> > > > > > Side data:
> > > > > > cpb: bitrate max/min/avg: 0/0/0 buffer size: 0
> > > > > > vbv_delay: N/A
> > > > > > [out#0/mp4 @ 0x5623a778e940] video:11443KiB audio:0KiB
> > > > > > subtitle:0KiB other streams:0KiB global headers:2KiB muxing
> > > > > > overhead: 0.213827%
> > > > > > frame= 1779 fps= 48 q=32.7 Lsize= 11468KiB time=00:01:11.08
> > > > > > bitrate=1321.7kbits/s speed=1.92x
> > > > > > x265 [info]: frame I: 9, Avg QP:26.34 kb/s: 10966.00
> > > > > > x265 [info]: frame P: 452, Avg QP:27.25 kb/s: 3883.36
> > > > > > x265 [info]: frame B: 1318, Avg QP:34.22 kb/s: 370.40
> > > > > > x265 [info]: Weighted P-Frames: Y:10.2% UV:0.0%
> > > > > >
> > > > > > encoded 1779 frames in 36.97s (48.12 fps), 1316.56 kb/s, Avg
> > > > > > QP:32.41
> > > > > >
> > > > > > ----------------
> > > > > >
> > > > > > 3) 12M h265_yuv422p10le_SR_deinterlaced.mp4
> > > > > >
> > > > > >
> > > > > > ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel
> > > > > > vulkan -hwaccel_output_format vulkan -i
> > > > > > h265_yuv422p10le_SR_deinterlaced.mp4 -f null - -benchmark
> > > > > > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> > > > > > 'h265_yuv422p10le_SR_deinterlaced.mp4':
> > > > > > Metadata:
> > > > > > major_brand : isom
> > > > > > minor_version : 512
> > > > > > compatible_brands: isomiso2mp41
> > > > > > encoder : Lavf61.1.100
> > > > > > Duration: 00:01:11.16, start: 0.000000, bitrate: 1320 kb/s
> > > > > > Stream #0:0[0x1](und): Video: hevc (Rext) (hev1 /
> > > > > > 0x31766568), yuv422p10le(pc, smpte170m/unknown/unknown,
> > > > > > progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1317 kb/s, 25 fps,
> > > > > > 25 tbr, 12800 tbn (default)
> > > > > > Metadata:
> > > > > > handler_name : VideoHandler
> > > > > > vendor_id : [0][0][0][0]
> > > > > > encoder : Lavc61.3.100 libx265
> > > > > > Stream mapping:
> > > > > > Stream #0:0 -> #0:0 (hevc (native) -> wrapped_avframe
> > > > > > (native))
> > > > > > Press [q] to stop, [?] for help
> > > > > > [hevc @ 0x56422043e480] Failed setup for format vulkan:
> > > > > > hwaccel initialisation returned error.
> > > > > > 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 @ 0x564220459f40] video:764KiB audio:0KiB
> > > > > > subtitle:0KiB other streams:0KiB global headers:0KiB muxing
> > > > > > overhead: unknown
> > > > > > frame= 1779 fps=790 q=-0.0 Lsize=N/A time=00:01:11.16
> > > > > > bitrate=N/A speed=31.6x
> > > > > > bench: utime=13.717s stime=0.122s rtime=2.251s
> > > > > > bench: maxrss=418956KiB
> > > > > >
> > > > > > ===================================
> > > > > >
> > > > >
> > > > >
> > > > > Can I see a full dump from vainfo? Want to confirm something
> > > > >
> > > > > >
> > > >
> > ....snip
> > >
> > >
> > >
> > > According to Intel's docs on libva, the rext HEVC profile is
> > > supported for decoding in your libva build, yet it fails on your end
> > > (DG2).
> > > I'm referring to the notes on
> > > https://github.com/intel/libva/blob/master/va/va_dec_hevc.h#L242,
> > > implying that this is tied to VAProfileHEVCScc* profile
> > entry-points.
> > > The failing video signals HEVC rext as it's profile.
> > > Perhaps an intel developer can take a look at this and assist?
> > >
> > > Copying some of them in the thread.
> >
> > vainfo shows the supported entry points base on VAAPI. It doesn't mean
> > vulkan also support them. You may use ffmpeg-vaapi to decode if you
> > want:
> > https://trac.ffmpeg.org/wiki/Hardware/VAAPI
> >
> > And more supported codec/formats can be found in intel media-driver's
> > wiki:
> > https://github.com/intel/media-driver
> >
> >
> > Thanks
> > Fei
> >
>
> > Is there a way to list the video formats supported by Vulkan?
> >
> > ...........snip
>
>
> Fwiw I tried to decode my source 10-bit ProRes 422 HQ video file - and
> did not get the error output:
>
> ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
> -hwaccel_output_format vulkan -i hd01.mov -f null - -benchmark
> [aist#0:1/pcm_s24le @ 0x55d342fef940] Guessed Channel Layout: hexadecagonal
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01.mov':
> Metadata:
> creation_time : 2016-02-23T23:49:21.000000Z
> Duration: 00:01:11.28, start: 0.000000, bitrate: 200496 kb/s
> Stream #0:0[0x1](eng): Video: prores (HQ) (apch / 0x68637061),
> yuv422p10le(bt709, top coded first (swapped)), 1920x1080, 182130 kb/s,
bt709 is widely supported (on a lot of platforms) though.
> SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 2500 tbn (default)
> Metadata:
> creation_time : 2016-02-23T23:49:21.000000Z
> handler_name : Apple Video Media Handler
> vendor_id : appl
> encoder : Apple ProRes 422 (HQ)
> Stream #0:1[0x2](eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000
> Hz, hexadecagonal, s32 (24 bit), 18432 kb/s (default)
> Metadata:
> creation_time : 2016-02-23T23:49:21.000000Z
> handler_name : Apple Sound Media Handler
> vendor_id : [0][0][0][0]
> Stream mapping:
> Stream #0:0 -> #0:0 (prores (native) -> wrapped_avframe (native))
> Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16le (native))
> Press [q] to stop, [?] for help
> Output #0, null, to 'pipe:':
> Metadata:
> encoder : Lavf61.1.100
> Stream #0:0(eng): Video: wrapped_avframe, yuv422p10le(tv, bt709, top
> coded first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s,
> 25 fps, 25 tbn (default)
> Metadata:
> creation_time : 2016-02-23T23:49:21.000000Z
> handler_name : Apple Video Media Handler
> vendor_id : appl
> encoder : Lavc61.3.100 wrapped_avframe
> Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, hexadecagonal, s16,
> 12288 kb/s (default)
> Metadata:
> creation_time : 2016-02-23T23:49:21.000000Z
> handler_name : Apple Sound Media Handler
> vendor_id : [0][0][0][0]
> encoder : Lavc61.3.100 pcm_s16le
> [out#0/null @ 0x55d343006f40] video:765KiB audio:106920KiB subtitle:0KiB
> other streams:0KiB global headers:0KiB muxing overhead: unknown
> frame= 1781 fps=707 q=-0.0 Lsize=N/A time=00:01:11.24 bitrate=N/A
> speed=28.3x
> bench: utime=36.467s stime=0.477s rtime=2.517s
> bench: maxrss=353584KiB
More information about the ffmpeg-user
mailing list