On Wed, 2024-08-14 at 22:43 +0300, Dennis Mungai wrote: > On Wed, 14 Aug 2024 at 15:27, Terje J. Hanssen > <terjejhans...@gmail.com> wrote: > > > > > > Den 14.08.2024 14:22, skrev Dennis Mungai: > > > > > On Wed, Aug 14, 2024, 15:15 Terje J. Hanssen > > > <terjejhans...@gmail.com> wrote: > > > > > > > > > > > > > > > Den 14.08.2024 02:05, skrev Dennis Mungai: > > > > > > > > > On Wed, 14 Aug 2024, 02:59 Dennis Mungai, <dmng...@gmail.com> > > > > > wrote: > > > > > > > > > > > On Wed, 14 Aug 2024, 02:45 Terje J. Hanssen, > > > > > > <terjejhans...@gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > Den 13.08.2024 19:40, skrev Dennis Mungai: > > > > > > > > > > > > > > > On Tue, 13 Aug 2024 at 19:49, Andrew Randrianasulu > > > > > > > > <randrianas...@gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > вт, 13 авг. 2024 г., 19:46 Terje J. Hanssen > > > > > > > > > <terjejhans...@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 > > > > > > > > > > > > > > > > > > > > > > > > > > ------------- > > > > > > > > > > > > > > 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 > > > > > > > > > > > > > > ------------- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ....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 > > > > > > > > > > > vainfo > > Trying display: wayland > > Trying display: x11 > > 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 > > vainfo: VA-API version: 1.22 (libva 2.22.0) > > vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics > > - 24.1.5 () > > vainfo: Supported profile and entrypoints > > VAProfileNone : VAEntrypointVideoProc > > VAProfileNone : VAEntrypointStats > > VAProfileMPEG2Simple : VAEntrypointVLD > > VAProfileMPEG2Main : VAEntrypointVLD > > VAProfileH264Main : VAEntrypointVLD > > VAProfileH264Main : VAEntrypointEncSliceLP > > VAProfileH264High : VAEntrypointVLD > > VAProfileH264High : VAEntrypointEncSliceLP > > VAProfileJPEGBaseline : VAEntrypointVLD > > VAProfileJPEGBaseline : VAEntrypointEncPicture > > VAProfileH264ConstrainedBaseline: VAEntrypointVLD > > VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP > > VAProfileHEVCMain : VAEntrypointVLD > > VAProfileHEVCMain : VAEntrypointEncSliceLP > > VAProfileHEVCMain10 : VAEntrypointVLD > > VAProfileHEVCMain10 : VAEntrypointEncSliceLP > > VAProfileVP9Profile0 : VAEntrypointVLD > > VAProfileVP9Profile0 : VAEntrypointEncSliceLP > > VAProfileVP9Profile1 : VAEntrypointVLD > > VAProfileVP9Profile1 : VAEntrypointEncSliceLP > > VAProfileVP9Profile2 : VAEntrypointVLD > > VAProfileVP9Profile2 : VAEntrypointEncSliceLP > > VAProfileVP9Profile3 : VAEntrypointVLD > > VAProfileVP9Profile3 : VAEntrypointEncSliceLP > > VAProfileHEVCMain12 : VAEntrypointVLD > > VAProfileHEVCMain422_10 : VAEntrypointVLD > > VAProfileHEVCMain422_10 : VAEntrypointEncSliceLP > > VAProfileHEVCMain422_12 : VAEntrypointVLD > > VAProfileHEVCMain444 : VAEntrypointVLD > > VAProfileHEVCMain444 : VAEntrypointEncSliceLP > > VAProfileHEVCMain444_10 : VAEntrypointVLD > > VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP > > VAProfileHEVCMain444_12 : VAEntrypointVLD > > VAProfileHEVCSccMain : VAEntrypointVLD > > VAProfileHEVCSccMain : VAEntrypointEncSliceLP > > VAProfileHEVCSccMain10 : VAEntrypointVLD > > VAProfileHEVCSccMain10 : VAEntrypointEncSliceLP > > VAProfileHEVCSccMain444 : VAEntrypointVLD > > VAProfileHEVCSccMain444 : VAEntrypointEncSliceLP > > VAProfileAV1Profile0 : VAEntrypointVLD > > VAProfileAV1Profile0 : VAEntrypointEncSliceLP > > VAProfileHEVCSccMain444_10 : VAEntrypointVLD > > VAProfileHEVCSccMain444_10 : VAEntrypointEncSliceLP > > > > > > > > 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 _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".