чт, 4 дек. 2025 г., 01:44 Andrew Randrianasulu <[email protected]>:

>
>
> ср, 3 дек. 2025 г., 23:07 Terje J. Hanssen <[email protected]>:
>
>>
>> Den 03.12.2025 17:05, skrev Andrew Randrianasulu:
>>
>>
>>
>> ср, 3 дек. 2025 г., 18:18 Terje J. Hanssen <[email protected]>:
>>
>>>
>>> Den 02.12.2025 21:18, skrev Andrew Randrianasulu:
>>>
>>>
>>>
>>> вт, 2 дек. 2025 г., 22:45 Terje J. Hanssen <[email protected]>:
>>>
>>>>
>>>>
>>>> Den 02.12.2025 15:48, skrev Andrew Randrianasulu:
>>>>
>>>> On Tue, Dec 2, 2025 at 5:11 PM Terje J. Hanssen via 
>>>> ffmpeg-user<[email protected]> <[email protected]> wrote:
>>>>
>>>> Hello list members
>>>>
>>>> Any ideas and suggestions to how to get ffmpeg vulkan video transcoding
>>>> to work?
>>>> All my attempts so far are unsuccessful and finish with Conversion failed!
>>>> Below is one code line with verbose output.
>>>>
>>>> Terje J. Hanssen
>>>>
>>>> --------
>>>>
>>>> My system and hardware
>>>>    Kernel: 6.12.59-1-longterm arch: x86_64 bits: 64
>>>>    Desktop: GNOME v: 49.1 Distro: openSUSE Tumbleweed-Slowroll 20251106
>>>> Graphics:   Device-1: Intel DG2 [Arc A750] driver: i915 v: kernel
>>>>
>>>> with
>>>> Vulkan v. 25.2.6, Mesa  v. 25.2.6 and system ffmpeg-8 v. 8.0 (from Packman)
>>>>
>>>> I can verify the following ffmpeg Vulkan video support:
>>>>
>>>> ffmpeg -hide_banner -encoders | grep vulkan
>>>>   V....D av1_vulkan           AV1 (Vulkan) (codec av1)
>>>>   V....D ffv1_vulkan          FFmpeg video codec #1 (Vulkan) (codec ffv1)
>>>>   V....D h264_vulkan          H.264/AVC (Vulkan) (codec h264)
>>>>   V....D hevc_vulkan          H.265/HEVC (Vulkan) (codec hevc)
>>>>
>>>> And by enabling both Vulkan video decode and encode support in the ANV
>>>> driver via the following environment variable
>>>>
>>>>          export ANV_DEBUG="video-decode,video-encode"
>>>>
>>>> I can verify the following Vulkan Video Encode support:
>>>>
>>>> vulkaninfo | grep -i encode
>>>>      VK_KHR_video_encode_h264                      : extension revision 14
>>>>      VK_KHR_video_encode_h265                      : extension revision 14
>>>>      VK_KHR_video_encode_queue                     : extension revision 12
>>>>          queueFlags                  = QUEUE_VIDEO_DECODE_BIT_KHR |
>>>> QUEUE_VIDEO_ENCODE_BIT_KHR
>>>>                  VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR
>>>>                  VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR
>>>>
>>>> --------
>>>>
>>>> ffmpeg -hide_banner -v verbose -init_hw_device "vulkan=vk:0" -hwaccel
>>>> vulkan -hwaccel_output_format vulkan -i hdv09_04.m2t -c:v h264_vulkan -y
>>>> hdv09_04_h264_vulkan.mp4
>>>>
>>>> I *suspect* mpeg2 decoding is not supported by Vulkan video ? Unless
>>>> someone reesurrect Mesa shaders that used to work at some point as
>>>> vulkan compute shaders ?
>>>>
>>>> Try different (h264, h265, vp9, av1) input file ?
>>>>
>>>>
>>>> What I can tell is that ffmpeg vulkan decoding benchmarks using mpeg2
>>>> seemingly has worked better for a long time 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 hdv09_04.m2t -f null - -benchmark
>>>> .........snip
>>>> [mpegts @ 0x563c726901c0] PES packet size mismatch.88 bitrate=N/A
>>>> speed= 145x elapsed=0:00:01.50
>>>> [mpegts @ 0x563c726901c0] Packet corrupt (stream = 1, dts = 258142320).
>>>> [mpeg2video @ 0x563c72653500] ac-tex damaged at 10 61
>>>> [mpeg2video @ 0x563c72653500] Warning MVs not available
>>>> [mpeg2video @ 0x563c72653500] concealing 630 DC, 630 AC, 630 MV errors
>>>> in P frame
>>>> [vist#0:0/mpeg2video @ 0x563c726e3b00] [dec:mpeg2video @
>>>> 0x563c726d4e40] corrupt decoded frame
>>>> [out#0/null @ 0x563c726d5140] video:2422KiB audio:44770KiB
>>>> subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead:
>>>> unknown
>>>> frame= 5963 fps=3635 q=-0.0 Lsize=N/A time=00:03:58.77 bitrate=N/A
>>>> speed= 146x elapsed=0:00:01.64
>>>> bench: utime=19.196s stime=0.323s rtime=1.641s
>>>> bench: maxrss=185604KiB
>>>>
>>>
>>> Strange, may be some software decoding fallback patch now gets broken in
>>> ffmpeg? URL dies not list MPEG2 as Vulkan decodeable ...
>>>
>>> Do you have older ffmpeg (7.0, 7.1) around?
>>>
>>>
>>>
>>> I reinstalled ffmpeg-7 v. 7.1  (Packman version) and retested the same
>>> mpeg2video (hdv1080i50.m2t) video file using the Vulkan decoding benchmark.
>>>
>>> First, the normal output seemingly looks better than the previous
>>> ffmpeg-8 test:
>>>
>>> ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
>>> -hwaccel_output_format vulkan -i hdv09_04.m2t -f null - -benchmark
>>>
>>> .....snip
>>>
>> [mpegts @ 0x55b810d2c180] PES packet size mismatch.00 bitrate=N/A speed=
>>> 148x
>>> [mpegts @ 0x55b810d2c180] Packet corrupt (stream = 1, dts = 258142320).
>>> [mpeg2video @ 0x55b810cf0940] ac-tex damaged at 10 61
>>> [mpeg2video @ 0x55b810cf0940] Warning MVs not available
>>> [mpeg2video @ 0x55b810cf0940] concealing 630 DC, 630 AC, 630 MV errors
>>> in P frame
>>> [vist#0:0/mpeg2video @ 0x55b811857440] [dec:mpeg2video @ 0x55b8118595c0]
>>> corrupt decoded frame
>>> [out#0/null @ 0x55b811864f80] video:2562KiB audio:44770KiB subtitle:0KiB
>>> other streams:0KiB global headers:0KiB muxing overhead: unknown
>>>
>>> frame= 5963 fps=3693 q=-0.0 Lsize=N/A time=00:03:58.77 bitrate=N/A
>>> speed= 148x
>>>
>>
>> Looking at speed I think ffmpeg 7.1 just demuxes, without even trying to
>> decode? Can you test with some light -c:v like again mpeg2 or mpeg4 ?
>>
>>
>> This is using ffmpeg-7. Please correct my code lines. I can try again
>> using ffmpeg-8
>>
>> ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
>> -hwaccel_output_format vulkan -i hdv09_04.m2t -c:v h264_vulkan
>> hdv09_04_h264_vulkan.mp4
>> ...............
>> Impossible to convert between the formats supported by the filter
>> 'Parsed_null_0' and the filter 'auto_scale_0'
>>
>
> may be try to add -noautoscale ?
>

Aah, got ffv1_vulkan working on Termux over lavapipe (software vulkan
driver):


ffmpeg -init_hw_device vulkan -i giraffe.ogg -an -vf hwupload,format=vulkan
-level 4 -strict -2 -c:v ffv1_vulkan -frames 200 v.mkv

at 0.1 fps, but it worked (resulting file was viewable in mpv)


[really long snip ]





>
>
>>
>
>>
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to