ffv1_vulkan issues
I have been trying to get ffv1_vulkan to encode since it was first added. My machine is running Arch Linux, a 7800XT using Mesa drivers and at time of testing/writing "ffmpeg version N-118193-g5f38c82536" Currently when running a basic encode I get a hand full of errors: `ffmpeg -hwaccel vulkan -hwaccel_output_format vulkan -i x264-video.mp4 -c:v ffv1_vulkan test.avi` I get this output: ``` [ffv1_vulkan @ 0x5c6e5c559a80] format nv12 not supported [vost#0:0/ffv1_vulkan @ 0x5c6e5c5ca700] [enc:ffv1_vulkan @ 0x5c6e5c5565c0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. [vf#0:0 @ 0x5c6e5c559e40] Error sending frames to consumers: Function not implemented [vf#0:0 @ 0x5c6e5c559e40] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0x5c6e5c559e40] Terminating thread with return code -38 (Function not implemented) [vost#0:0/ffv1_vulkan @ 0x5c6e5c5ca700] [enc:ffv1_vulkan @ 0x5c6e5c5565c0] Could not open encoder before EOF [vost#0:0/ffv1_vulkan @ 0x5c6e5c5ca700] Task finished with error code: -22 (Invalid argument) [vost#0:0/ffv1_vulkan @ 0x5c6e5c5ca700] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x5c6e5c55aa40] Nothing was written into output file, because at least one of its streams received no packets. ``` if I try it as `ffmpeg -init_hw_device vulkan=vk:0 -filter_hw_device vk -i x264-video.mp4 -c:v ffv1_vulkan test.avi` then I get a second kind of error: ``` Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0' [vf#0:0 @ 0x58c7e1705d80] Error reinitializing filters! [vf#0:0 @ 0x58c7e1705d80] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0x58c7e1705d80] Terminating thread with return code -38 (Function not implemented) [vost#0:0/ffv1_vulkan @ 0x58c7e16a8b80] [enc:ffv1_vulkan @ 0x58c7e17a8d00] Could not open encoder before EOF [vost#0:0/ffv1_vulkan @ 0x58c7e16a8b80] Task finished with error code: -22 (Invalid argument) [vost#0:0/ffv1_vulkan @ 0x58c7e16a8b80] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x58c7e16a7f40] Nothing was written into output file, because at least one of its streams received no packets. ``` if I use both `-init_hw_device vulkan=vk:0 -filter_hw_device vk` and `-hwaccel vulkan -hwaccel_output_format vulkan` together I get the first error again, and finally trying to add `-vf "hwmap=derive_device=vulkan"` I get this final error: ``` [Parsed_hwmap_0 @ 0x7ff2c8004c40] Failed to map frame: -38. [vf#0:0 @ 0x5d5327742040] Error while filtering: Function not implemented [vf#0:0 @ 0x5d5327742040] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0x5d5327742040] Terminating thread with return code -38 (Function not implemented) [vost#0:0/ffv1_vulkan @ 0x5d53278b9440] [enc:ffv1_vulkan @ 0x5d53277ef2c0] Could not open encoder before EOF [vost#0:0/ffv1_vulkan @ 0x5d53278b9440] Task finished with error code: -22 (Invalid argument) [vost#0:0/ffv1_vulkan @ 0x5d53278b9440] Terminating thread with return code -22 (Invalid argument) [out#0/avi @ 0x5d53278f6fc0] Nothing was written into output file, because at least one of its streams received no packets. ``` Can I get some guidance on getting this to work, I am at a loss
On 12/28/24 2:40 AM, BuyMyMojo wrote:
I have been trying to get ffv1_vulkan to encode since it was first added.
My machine is running Arch Linux, a 7800XT using Mesa drivers and at time of testing/writing "ffmpeg version N-118193-g5f38c82536"
Currently when running a basic encode I get a hand full of errors:
`ffmpeg -hwaccel vulkan -hwaccel_output_format vulkan -i x264-video.mp4 -c:v ffv1_vulkan test.avi`
I get this output:
```
[ffv1_vulkan @ 0x5c6e5c559a80] format nv12 not supported
It looks like you're getting an issue with pixel format. ffv1 doesn't support nv12, which is essentially yuv420p, but packed instead of planar. Your device is decoding the H.264 video to nv12, and since this is all done in hardware, there's no automatic scale filter inserted. I recommend decoding in software and encoding in hardware to solve this for H.264 - may as well just run something like this: ffmpeg -i input.mp4 -init_hw_device vulkan -c:v ffv1_vulkan output.mkv (I also would not recommend putting ffv1 inside AVI, or using AVI at all nowadays if you have a choice.) - Leo Izen (Traneptora)
ffmpeg -i input.mp4 -init_hw_device vulkan -c:v ffv1_vulkan output.mkv
Hi there sorry for the late reply! Using your command also doesn't output any video, running it exactly results in this: ``` Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0' [vf#0:0 @ 0x585d5a68b680] Error reinitializing filters! [vf#0:0 @ 0x585d5a68b680] Task finished with error code: -38 (Function not implemented) [vf#0:0 @ 0x585d5a68b680] Terminating thread with return code -38 (Function not implemented) [vost#0:0/ffv1_vulkan @ 0x585d5a5f0640] [enc:ffv1_vulkan @ 0x585d5a7ea6c0] Could not open encoder before EOF [vost#0:0/ffv1_vulkan @ 0x585d5a5f0640] Task finished with error code: -22 (Invalid argument) [vost#0:0/ffv1_vulkan @ 0x585d5a5f0640] Terminating thread with return code -22 (Invalid argument) [out#0/matroska @ 0x585d5a86f140] Nothing was written into output file, because at least one of its streams received no packets. ```
participants (3)
-
BuyMyMojo -
Leo Izen -
Owen Quinlan