A patch brings hardware encoding with vulkan into ffmpeg. In the future I will try to make a preset for h264, but if I understand correctly you have to use the ffmpeg from Lynne's repository and then compile it with the --enable-vulkan option. Do you think a simple replacement of our ffmpeg tar.gz with Lynne's tar.gz is enough? https://lynne.ee/vulkan-video-encoding.html
From reading Lynne's note, it seems like the ffmpeg team will be merging Vulcan into ffmpeg eventually. But if I remember correctly, it was Vulcan that was delaying release of version 6.0 so it may be awhile. Would it not make more sense to develop a patchset from Lynne's work rather than pull ffmpeg from their repository? That repository probably is not just 7.0, but more mods in it? Not sure.
On Sun, Aug 11, 2024 at 1:55 PM Andrea paz via Cin < [email protected]> wrote:
A patch brings hardware encoding with vulkan into ffmpeg. In the future I will try to make a preset for h264, but if I understand correctly you have to use the ffmpeg from Lynne's repository and then compile it with the --enable-vulkan option. Do you think a simple replacement of our ffmpeg tar.gz with Lynne's tar.gz is enough? https://lynne.ee/vulkan-video-encoding.html -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
вс, 11 авг. 2024 г., 23:06 Phyllis Smith via Cin <[email protected]
:
From reading Lynne's note, it seems like the ffmpeg team will be merging Vulcan into ffmpeg eventually. But if I remember correctly, it was Vulcan that was delaying release of version 6.0 so it may be awhile. Would it not make more sense to develop a patchset from Lynne's work rather than pull ffmpeg from their repository? That repository probably is not just 7.0, but more mods in it? Not sure.
https://github.com/cyanreg/FFmpeg/tree/vulkan I think it more like 7.0+git , description says it 35 commits ahead of ffmpeg git snapshot that by itself 185 commits behind current ffmpeg.git head ? May be if we interested in encoding part of it just try to build this tree standalone and pipe y4m to its ffmpeg binary? Or pretend we have "7.1" already by packaging this git branch into tarball named like release, putting it in thirdparty/src, patching our configure.ac then see failures from API changes ? :)
On Sun, Aug 11, 2024 at 1:55 PM Andrea paz via Cin < [email protected]> wrote:
A patch brings hardware encoding with vulkan into ffmpeg. In the future I will try to make a preset for h264, but if I understand correctly you have to use the ffmpeg from Lynne's repository and then compile it with the --enable-vulkan option. Do you think a simple replacement of our ffmpeg tar.gz with Lynne's tar.gz is enough? https://lynne.ee/vulkan-video-encoding.html -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
вс, 11 авг. 2024 г., 23:35 Andrew Randrianasulu <[email protected]>:
вс, 11 авг. 2024 г., 23:06 Phyllis Smith via Cin < [email protected]>:
From reading Lynne's note, it seems like the ffmpeg team will be merging Vulcan into ffmpeg eventually. But if I remember correctly, it was Vulcan that was delaying release of version 6.0 so it may be awhile. Would it not make more sense to develop a patchset from Lynne's work rather than pull ffmpeg from their repository? That repository probably is not just 7.0, but more mods in it? Not sure.
https://github.com/cyanreg/FFmpeg/tree/vulkan
I think it more like 7.0+git , description says it 35 commits ahead of ffmpeg git snapshot that by itself 185 commits behind current ffmpeg.git head ?
May be if we interested in encoding part of it just try to build this tree standalone and pipe y4m to its ffmpeg binary?
Or pretend we have "7.1" already by packaging this git branch into tarball named like release, putting it in thirdparty/src, patching our configure.ac then see failures from API changes ? :)
ah, it seems to be merged 17 hours ago into main tree :) https://git.ffmpeg.org/gitweb/ffmpeg.git see commits by Lynne so 'just' building with ffmpeg.git (and probably fixing thirdparty/Makefile so it does not disable vulkan for ffmpeg anymore - i hope building with old vulkan headers was fixed? or we need to pass --disable-vulkan on "old" OSes afterwards) should expose new encoder?
On Sun, Aug 11, 2024 at 1:55 PM Andrea paz via Cin < [email protected]> wrote:
A patch brings hardware encoding with vulkan into ffmpeg. In the future I will try to make a preset for h264, but if I understand correctly you have to use the ffmpeg from Lynne's repository and then compile it with the --enable-vulkan option. Do you think a simple replacement of our ffmpeg tar.gz with Lynne's tar.gz is enough? https://lynne.ee/vulkan-video-encoding.html -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Den 11.08.2024 21:54, skrev Andrea paz via Cin:
A patch brings hardware encoding with vulkan into ffmpeg. In the future I will try to make a preset for h264, but if I understand correctly you have to use the ffmpeg from Lynne's repository and then compile it with the --enable-vulkan option. Do you think a simple replacement of our ffmpeg tar.gz with Lynne's tar.gz is enough? https://lynne.ee/vulkan-video-encoding.html
According to this current Phoronix news article https://www.phoronix.com/news/FFmpeg-Adds-Vulkan-Video-Encode "Since the release of FFmpeg 6.1 last year there has been accelerated Vulkan Video decoding <https://www.phoronix.com/news/FFmpeg-6.1-Released> support while being merged to FFmpeg Git this weekend is the Vulkan Video encode support. The latest Vulkan Video patches by Lynne have now been upstreamed into FFmpeg for enabling GPU accelerated video encoding using this cross-vendor, cross-OS API. This Vulkan Video encode support is currently in place for H.264 and H.265. This Vulkan Video encode support is now in FFmpeg Git <https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog> ahead of the project's next release."
Den 11.08.2024 22:43, skrev Terje J. Hanssen:
Den 11.08.2024 21:54, skrev Andrea paz via Cin:
A patch brings hardware encoding with vulkan into ffmpeg. In the future I will try to make a preset for h264, but if I understand correctly you have to use the ffmpeg from Lynne's repository and then compile it with the --enable-vulkan option. Do you think a simple replacement of our ffmpeg tar.gz with Lynne's tar.gz is enough? https://lynne.ee/vulkan-video-encoding.html
According to this current Phoronix news article https://www.phoronix.com/news/FFmpeg-Adds-Vulkan-Video-Encode
"Since the release of FFmpeg 6.1 last year there has been accelerated Vulkan Video decoding <https://www.phoronix.com/news/FFmpeg-6.1-Released> support while being merged to FFmpeg Git this weekend is the Vulkan Video encode support. The latest Vulkan Video patches by Lynne have now been upstreamed into FFmpeg for enabling GPU accelerated video encoding using this cross-vendor, cross-OS API. This Vulkan Video encode support is currently in place for H.264 and H.265. This Vulkan Video encode support is now in FFmpeg Git <https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog> ahead of the project's next release."
Regarding Vulkan AV1 Video Decoding Extension https://www.phoronix.com/news/Vulkan-Video-AV1-Decode Possibly also AV1 Encoding support next was planned as listed in the dotted box here(?) https://www.khronos.org/blog/khronos-releases-vulkan-video-av1-decode-extens...
I could never get decoding to work with vulkan (h264), problems with the "device." I don't think I've ever modified the makefile though, will that be the problem?
пн, 12 авг. 2024 г., 00:30 Andrea paz via Cin <[email protected]>:
I could never get decoding to work with vulkan (h264), problems with the "device." I don't think I've ever modified the makefile though, will that be the problem?
ah, sorry, may be it was my local mid I do not see "vulkan" string there so I assume ffmpeg left to autodetect this? from ffmpeg's configure: --disable-vulkan disable Vulkan code [autodetect] does system's ffmpeg (with vulkan decode enabled ?) works in itself for decoding? May be you should run cin with CIN_HW_DEV=vulkan before launching cin ? --
Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Den 11.08.2024 23:30, skrev Andrea paz:
I could never get decoding to work with vulkan (h264), problems with the "device."
I also get [h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error. when I test Vulkan decoding with my system ffmpeg-7 according to https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan -hwaccel_output_format vulkan -i h264_10bit_yuv422p10le.mp4 -f null - -benchmark Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'h264_10bit_yuv422p10le.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf61.1.100 Duration: 00:01:11.20, start: 0.000000, bitrate: 9366 kb/s Stream #0:0[0x1](und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(pc, smpte170m/unknown/unknown, top first), 1920x1080 [SAR 1:1 DAR 16:9], 9364 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 [h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error. 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, yuv422p10le(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 @ 0x560566f981c0] video:765KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 1780 fps=771 q=-0.0 Lsize=N/A time=00:01:11.20 bitrate=N/A speed=30.9x bench: utime=21.156s stime=0.154s rtime=2.307s bench: maxrss=327376KiB Testing with a h265 input file I get [hevc @ 0x5570ad2efb80] Device does not support the VK_KHR_video_decode_queue extension! [hevc @ 0x5570ad2efb80] Failed setup for format vulkan: hwaccel initialisation returned error. [hevc @ 0x5570ad2efb80] Unsupported film grain parameters. Ignoring film grain. ........ frame= 1779 fps=756 q=-0.0 Lsize=N/A time=00:01:11.16 bitrate=N/A speed=30.2x bench: utime=15.973s stime=0.172s rtime=2.353s bench: maxrss=347452KiB This is ffmpeg-7 v. 7.0-1699.5.0.6.pm.1 from Packman on openSUSE Tw-Slowroll, which is a bit behind this Tumbleweed built version https://opensuse.pkgs.org/tumbleweed/packman-x86_64/ffmpeg-7-7.0-1699.6.pm.3... Graphics and drivers; lspci | grep VGA 03:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A750] (rev 08) inxi -G 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: EGL Message: EGL data requires eglinfo. Check --recommends.
пн, 12 авг. 2024 г., 03:48 Terje J. Hanssen via Cin < [email protected]>:
Den 11.08.2024 23:30, skrev Andrea paz:
I could never get decoding to work with vulkan (h264), problems with the "device."
I also get
[h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error.
I think you need vulkaninfo to see if you have this extension exposed ? driver for Intel called "anv" in mesa so may be check for this ext. name in mesa's git? for AMD it will be "radv" not sure how they packaged on your distros .... when I test Vulkan decoding with my system ffmpeg-7 according to
https://trac.ffmpeg.org/wiki/HWAccelIntro#Vulkan
ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan -hwaccel_output_format vulkan -i h264_10bit_yuv422p10le.mp4 -f null - -benchmark
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'h264_10bit_yuv422p10le.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf61.1.100 Duration: 00:01:11.20, start: 0.000000, bitrate: 9366 kb/s Stream #0:0[0x1](und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(pc, smpte170m/unknown/unknown, top first), 1920x1080 [SAR 1:1 DAR 16:9], 9364 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 [h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error. 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, yuv422p10le(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 @ 0x560566f981c0] video:765KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 1780 fps=771 q=-0.0 Lsize=N/A time=00:01:11.20 bitrate=N/A speed=30.9x bench: utime=21.156s stime=0.154s rtime=2.307s bench: maxrss=327376KiB
Testing with a h265 input file I get
[hevc @ 0x5570ad2efb80] Device does not support the VK_KHR_video_decode_queue extension! [hevc @ 0x5570ad2efb80] Failed setup for format vulkan: hwaccel initialisation returned error. [hevc @ 0x5570ad2efb80] Unsupported film grain parameters. Ignoring film grain. ........ frame= 1779 fps=756 q=-0.0 Lsize=N/A time=00:01:11.16 bitrate=N/A speed=30.2x bench: utime=15.973s stime=0.172s rtime=2.353s bench: maxrss=347452KiB
This is ffmpeg-7 v. 7.0-1699.5.0.6.pm.1 from Packman on openSUSE Tw-Slowroll, which is a bit behind this Tumbleweed built version
https://opensuse.pkgs.org/tumbleweed/packman-x86_64/ffmpeg-7-7.0-1699.6.pm.3...
Graphics and drivers;
lspci | grep VGA 03:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A750] (rev 08)
inxi -G 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: EGL Message: EGL data requires eglinfo. Check --recommends.
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Similar to Terje, using system ffmpeg I get his same result and error (I have amd graphics). I do not find the extension "VK_KHR_video_decode_queue" in "vulkaninfo". I see in https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_vid... the description: "This extension builds upon the VK_KHR_video_queue extension by adding common APIs specific to video decoding and thus enabling implementations to expose queue families supporting video decode operations. More specifically, it adds video decode specific capabilities and a new command buffer command that allows recording video decode operations against a video session. This extension is to be used in conjunction with other codec specific video decode extensions that enable decoding video sequences of specific video compression standards." In CinGG .../thirdparty/makefile I find no reference to "vulkan", "video" and "decode". Using "CIN_HW_DEV=vulkan /home/paz/cinelerra5/cinelerra-5.1/bin/cin" With mxf video: Decoder dnxhd does not support device type vulkan. HW device init failed, using SW decode. With h264 video: Unknown HW surface format: vulkan Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. FFStream::decode: avcodec_send_packet failed. file:/home/paz/video_editing/free_video/bbb_sunflower_1080p_30fps_normal.mp4 err: Invalid data found when processing input FFStream::decode: failed HW device init failed, using SW decode. CinGG compile with ffmpeg.git: ( ./configure don't recognize "--enable-vulkan") Without CIN_HW_DEV=vulkan /home/paz/cinelerra5/cinelerra-5.1/bin/cin: No message to terminal during playback. With CIN_HW_DEV=vulkan /home/paz/cinelerra5/cinelerra-5.1/bin/cin: Same error: Unknown HW surface format: vulkan Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. Failed to get HW surface format. FFStream::decode: avcodec_send_packet failed. file:/home/paz/video_editing/free_video/bbb_sunflower_1080p_30fps_normal.mp4 err: Invalid data found when processing input FFStream::decode: failed HW device init failed, using SW decode.
Den 12.08.2024 02:58, skrev Andrew Randrianasulu:
пн, 12 авг. 2024 г., 03:48 Terje J. Hanssen via Cin <[email protected]>:
Den 11.08.2024 23:30, skrev Andrea paz:
I could never get decoding to work with vulkan (h264), problems with the "device."
I also get
[h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error.
I think you need vulkaninfo to see if you have this extension exposed ?
driver for Intel called "anv" in mesa so may be check for this ext. name in mesa's git?
for AMD it will be "radv"
not sure how they packaged on your distros ....
I installed a few more vulkan related packages included vulkan-tools with vulkaninfo. So now I have zypper se -is vulkan libva intel Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository ---+--------------------------------+---------+----------------------+--------+------------------------- i | intel-media-driver | package | 24.1.5-1.1 | x86_64 | openSUSE-Slowroll-Oss i | intel-vaapi-driver | package | 2.4.1-5.13 | x86_64 | openSUSE-Slowroll-Oss i | kernel-firmware-intel | package | 20240728-1.1 | noarch | openSUSE-Slowroll-Update i | kernel-firmware-intel | package | 20240728-1.1 | noarch | openSUSE-Slowroll-Oss i | libdrm_intel1 | package | 2.4.122-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libgstvulkan-1_0-0 | package | 1.24.6-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-drm2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-glx2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | libva-utils | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-wayland2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-x11-2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libvulkan1 | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | libvulkan_intel | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | libvulkan_lvp | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i | libVulkanLayerSettings-1_3_290 | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss i | Mesa-libva | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | Mesa-vulkan-device-select | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | Mesa-vulkan-overlay | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | ucode-intel | package | 20240531-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | vulkan-tools | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | vulkan-validationlayers | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss vulkaninfo | grep VK_KHR_video_decode_queue - not found vulkaninfo | grep Arc GPU id = 0 (Intel(R) Arc(tm) A750 Graphics (DG2)) GPU id = 0 (Intel(R) Arc(tm) A750 Graphics (DG2)) GPU id = 0 (Intel(R) Arc(tm) A750 Graphics (DG2)) GPU id : 0 (Intel(R) Arc(tm) A750 Graphics (DG2)): deviceName = Intel(R) Arc(tm) A750 Graphics (DG2) ls /usr/share/vulkan/icd.d/ intel_hasvk_icd.x86_64.json intel_icd.x86_64.json lvp_icd.x86_64.json vkcube Selected GPU 0: Intel(R) Arc(tm) A750 Graphics (DG2), type: DiscreteGpu - looks ok For me it seems like Vulkan and Intel drivers should work, though the missing VK_KHR_video_decode_queue prohibit the ffmpeg benchmark test? -------------- (On my legacy workstation w/MSI Skylake & Nvidia GeForce GTX 960 GPU, I was not able to get corresponding info, So I expect either it is too old and not supported, or there is some missing driver or setup)
пн, 12 авг. 2024 г., 15:33 Terje J. Hanssen <[email protected]>:
Den 12.08.2024 02:58, skrev Andrew Randrianasulu:
пн, 12 авг. 2024 г., 03:48 Terje J. Hanssen via Cin < [email protected]>:
Den 11.08.2024 23:30, skrev Andrea paz:
I could never get decoding to work with vulkan (h264), problems with the "device."
I also get
[h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error.
I think you need vulkaninfo to see if you have this extension exposed ?
driver for Intel called "anv" in mesa so may be check for this ext. name in mesa's git?
for AMD it will be "radv"
not sure how they packaged on your distros ....
I installed a few more vulkan related packages included vulkan-tools with vulkaninfo. So now I have
zypper se -is vulkan libva intel Loading repository data... Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+--------------------------------+---------+----------------------+--------+------------------------- i | intel-media-driver | package | 24.1.5-1.1 | x86_64 | openSUSE-Slowroll-Oss i | intel-vaapi-driver | package | 2.4.1-5.13 | x86_64 | openSUSE-Slowroll-Oss i | kernel-firmware-intel | package | 20240728-1.1 | noarch | openSUSE-Slowroll-Update i | kernel-firmware-intel | package | 20240728-1.1 | noarch | openSUSE-Slowroll-Oss i | libdrm_intel1 | package | 2.4.122-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libgstvulkan-1_0-0 | package | 1.24.6-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-drm2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-glx2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | libva-utils | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-wayland2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva-x11-2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libva2 | package | 2.22.0-1.1 | x86_64 | openSUSE-Slowroll-Oss i | libvulkan1 | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | libvulkan_intel | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | libvulkan_lvp | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i | libVulkanLayerSettings-1_3_290 | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss i | Mesa-libva | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | Mesa-vulkan-device-select | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | Mesa-vulkan-overlay | package | 24.1.2-1699.389.pm.3 | x86_64 | Packman i+ | ucode-intel | package | 20240531-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | vulkan-tools | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss i+ | vulkan-validationlayers | package | 1.3.290-1.1 | x86_64 | openSUSE-Slowroll-Oss
vulkaninfo | grep VK_KHR_video_decode_queue - not found
it seems you need env variable set? https://github.com/mpv-player/mpv/issues/11739 ====== - Intel - You must set ANV_VIDEO_DECODE=1 in your environment to expose video decoding - Both H.264 and H.265 are supported - VK_EXT_descriptor_buffer support, required for Vulkan filters, has been merged <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22151> but no release includes it yet - AMD - You must set RADV_PERFTEST=video_decode in your environment to expose video decoding ======
vulkaninfo | grep Arc GPU id = 0 (Intel(R) Arc(tm) A750 Graphics (DG2)) GPU id = 0 (Intel(R) Arc(tm) A750 Graphics (DG2)) GPU id = 0 (Intel(R) Arc(tm) A750 Graphics (DG2)) GPU id : 0 (Intel(R) Arc(tm) A750 Graphics (DG2)): deviceName = Intel(R) Arc(tm) A750 Graphics (DG2)
ls /usr/share/vulkan/icd.d/ intel_hasvk_icd.x86_64.json intel_icd.x86_64.json lvp_icd.x86_64.json
vkcube Selected GPU 0: Intel(R) Arc(tm) A750 Graphics (DG2), type: DiscreteGpu - looks ok
For me it seems like Vulkan and Intel drivers should work, though the missing VK_KHR_video_decode_queue prohibit the ffmpeg benchmark test? --------------
(On my legacy workstation w/MSI Skylake & Nvidia GeForce GTX 960 GPU, I was not able to get corresponding info, So I expect either it is too old and not supported, or there is some missing driver or setup)
Den 12.08.2024 18:51, skrev Andrew Randrianasulu:
пн, 12 авг. 2024 г., 15:33 Terje J. Hanssen <[email protected]>:
Den 12.08.2024 02:58, skrev Andrew Randrianasulu:
пн, 12 авг. 2024 г., 03:48 Terje J. Hanssen via Cin <[email protected]>:
Den 11.08.2024 23:30, skrev Andrea paz:
I could never get decoding to work with vulkan (h264), problems with the "device."
I also get
[h264 @ 0x560566feda40] Device does not support the VK_KHR_video_decode_queue extension! [h264 @ 0x560566feda40] Failed setup for format vulkan: hwaccel initialisation returned error.
I think you need vulkaninfo to see if you have this extension exposed ?
driver for Intel called "anv" in mesa so may be check for this ext. name in mesa's git?
for AMD it will be "radv"
not sure how they packaged on your distros ....
vulkaninfo | grep VK_KHR_video_decode_queue - not found
it seems you need env variable set?
https://github.com/mpv-player/mpv/issues/11739
======
* Intel o You must set |ANV_VIDEO_DECODE=1| in your environment to expose video decoding o Both H.264 and H.265 are supported o VK_EXT_descriptor_buffer support, required for Vulkan filters, has been merged <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22151> but no release includes it yet
Thank you. Setting this environment helped to remove the first error message export ANV_VIDEO_DECODE=1 vulkaninfo | grep VK_KHR_video_decode_queue VK_KHR_video_decode_queue : extension revision 8 Still remaining hwaccel initialisation returned error for h264 and h265 input respectively: [h264 @ 0x55952760cf40] Failed setup for format vulkan: hwaccel initialisation returned error. [hevc @ 0x5580e96e8c80] Failed setup for format vulkan: hwaccel initialisation returned error. [hevc @ 0x5580e96e8c80] Unsupported film grain parameters. Ignoring film grain. ================ vulkaninfo --summary ========== VULKANINFO ========== Vulkan Instance Version: 1.3.290 Instance Extensions: count = 24 ------------------------------- VK_EXT_acquire_drm_display : extension revision 1 VK_EXT_acquire_xlib_display : extension revision 1 VK_EXT_debug_report : extension revision 10 VK_EXT_debug_utils : extension revision 2 VK_EXT_direct_mode_display : extension revision 1 VK_EXT_display_surface_counter : extension revision 1 VK_EXT_headless_surface : extension revision 1 VK_EXT_surface_maintenance1 : extension revision 1 VK_EXT_swapchain_colorspace : extension revision 4 VK_KHR_device_group_creation : extension revision 1 VK_KHR_display : extension revision 23 VK_KHR_external_fence_capabilities : extension revision 1 VK_KHR_external_memory_capabilities : extension revision 1 VK_KHR_external_semaphore_capabilities : extension revision 1 VK_KHR_get_display_properties2 : extension revision 1 VK_KHR_get_physical_device_properties2 : extension revision 2 VK_KHR_get_surface_capabilities2 : extension revision 1 VK_KHR_portability_enumeration : extension revision 1 VK_KHR_surface : extension revision 25 VK_KHR_surface_protected_capabilities : extension revision 1 VK_KHR_wayland_surface : extension revision 6 VK_KHR_xcb_surface : extension revision 6 VK_KHR_xlib_surface : extension revision 6 VK_LUNARG_direct_driver_loading : extension revision 1 Instance Layers: count = 3 -------------------------- VK_LAYER_KHRONOS_validation Khronos Validation Layer 1.3.290 version 1 VK_LAYER_MESA_device_select Linux device selection layer 1.3.211 version 1 VK_LAYER_MESA_overlay Mesa Overlay layer 1.3.211 version 1 Devices: ======== GPU0: apiVersion = 1.3.278 driverVersion = 24.1.2 vendorID = 0x8086 deviceID = 0x56a1 deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU deviceName = Intel(R) Arc(tm) A750 Graphics (DG2) driverID = DRIVER_ID_INTEL_OPEN_SOURCE_MESA driverName = Intel open-source Mesa driver driverInfo = Mesa 24.1.2 conformanceVersion = 1.3.6.0 deviceUUID = 8680a156-0800-0000-0300-000000000000 driverUUID = b0018696-40da-fe5a-ccad-54a5a6b3273f ===================
Thank you. Setting this environment helped to remove the first error message
export ANV_VIDEO_DECODE=1 vulkaninfo | grep VK_KHR_video_decode_queue VK_KHR_video_decode_queue : extension revision 8
Still remaining hwaccel initialisation returned error for h264 and h265 input respectively:
Same for me (with AMD)
Den 13.08.2024 09:25, skrev Andrea paz:
Thank you. Setting this environment helped to remove the first error message
export ANV_VIDEO_DECODE=1 vulkaninfo | grep VK_KHR_video_decode_queue VK_KHR_video_decode_queue : extension revision 8
Still remaining hwaccel initialisation returned error for h264 and h265 input respectively: Same for me (with AMD)
I did also an "attempt" to also add export ANV_VIDEO_ENCODE=1 vulkaninfo | grep VK_KHR_video VK_KHR_video_decode_h264 : extension revision 9 VK_KHR_video_decode_h265 : extension revision 8 VK_KHR_video_decode_queue : extension revision 8 VK_KHR_video_queue : extension revision 8 But as seen the output only show decode support, no encode yet. I guess my current Intel ANV Vulkan driver and/or Mesa versions not yet includes the new Vulkan encode capability (?) https://www.phoronix.com/news/Intel-Vulkan-Video-H264-H265
I compiled CinGH with ffmpg.git buy I have same errors. Il mar 13 ago 2024, 11:50 Terje J. Hanssen <[email protected]> ha scritto:
Den 13.08.2024 09:25, skrev Andrea paz:
Thank you. Setting this environment helped to remove the first error message
export ANV_VIDEO_DECODE=1 vulkaninfo | grep VK_KHR_video_decode_queue VK_KHR_video_decode_queue : extension revision 8
Still remaining hwaccel initialisation returned error for h264 and h265 input respectively:
Same for me (with AMD)
I did also an "attempt" to also add
export ANV_VIDEO_ENCODE=1 vulkaninfo | grep VK_KHR_video VK_KHR_video_decode_h264 : extension revision 9 VK_KHR_video_decode_h265 : extension revision 8 VK_KHR_video_decode_queue : extension revision 8 VK_KHR_video_queue : extension revision 8
But as seen the output only show decode support, no encode yet. I guess my current Intel ANV Vulkan driver and/or Mesa versions not yet includes the new Vulkan encode capability (?) https://www.phoronix.com/news/Intel-Vulkan-Video-H264-H265
Den 13.08.2024 12:03, skrev Andrea paz:
I compiled CinGH with ffmpg.git buy I have same errors.
The "Vulkan Tutorial" seems to be an interesting info reading. As I understand it, Vulkan is a generic cross-platform, computer-graphic engine. https://vulkan-tutorial.com/Development_environment#page_Linux And as from its Introducion section: However, the price you pay for these benefits is that you have to work with a significantly more verbose API. Every detail related to the graphics API needs to be set up from scratch by your application, including initial frame buffer creation and memory management for objects like buffers and texture images. The graphics driver will do a lot less hand holding, which means that you will have to do more work in your application to ensure correct behavior.The takeaway message here is that Vulkan is not for everyone. It is targeted at programmers who are enthusiastic about high performance computer graphics, and are willing to put some work in. Else, I have also requested the FFmpeg-user list about the ffmpeg Vulkan: hwaccel initialisation returned error, and from there it has been forwarded to Intel to possibly have a look at it and clarify more https://ffmpeg.org//pipermail/ffmpeg-user/2024-August/058562.html <https://ffmpeg.org//pipermail/ffmpeg-user/2024-August/058562.html>
Den 15.08.2024 11:52, skrev Terje J. Hanssen:
Den 13.08.2024 12:03, skrev Andrea paz:
I compiled CinGH with ffmpg.git buy I have same errors.
The "Vulkan Tutorial" seems to be an interesting info reading. As I understand it, Vulkan is a generic cross-platform, computer-graphic engine. https://vulkan-tutorial.com/Development_environment#page_Linux
And as from its Introducion section: However, the price you pay for these benefits is that you have to work with a significantly more verbose API. Every detail related to the graphics API needs to be set up from scratch by your application, including initial frame buffer creation and memory management for objects like buffers and texture images. The graphics driver will do a lot less hand holding, which means that you will have to do more work in your application to ensure correct behavior.The takeaway message here is that Vulkan is not for everyone. It is targeted at programmers who are enthusiastic about high performance computer graphics, and are willing to put some work in.
Else, I have also requested the FFmpeg-user list about the ffmpeg Vulkan: hwaccel initialisation returned error, and from there it has been forwarded to Intel to possibly have a look at it and clarify more https://ffmpeg.org//pipermail/ffmpeg-user/2024-August/058562.html <https://ffmpeg.org//pipermail/ffmpeg-user/2024-August/058562.html>
I have posted on other forums too without more clarifying results. What I have found from my own tests is that Vulkan currently only support 8-bit h264/h265 decoding, not 10-bit yet. In comparison, Intel QSV has broad codec and pixel format support https://trac.ffmpeg.org/wiki/Hardware/QuickSync#HardwareSupport For example no problems with 10-bit yuv422p10le on my DG2 GPU: ffmpeg -hide_banner -hwaccel qsv -hwaccel_output_format qsv -i h265_yuv422p10le_SR.mp4 -f null - -benchmark frame= 1779 fps=1346 q=-0.0 Lsize=N/A time=00:01:11.16 bitrate=N/A speed=53.8x bench: utime=0.607s stime=0.126s rtime=1.322s bench: maxrss=83032KiB
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Phyllis Smith -
Terje J. Hanssen