Since updating hardware (5600X to 9800X3D and 1080 to 9070XT) I have been unable to make ffmpeg video encoding work on the new machine.
When using the CPU (libsvtav1) ffmpeg works as expected until I run a second ffmpeg process, or open a Steam application, at which point the encoding stops with no error, and Steam restarts itself. This did not happen with the 5600X.
When using the GPU (av1_amf) ffmpeg crashes:
radv: RADV_PERFTEST=video_decode is deprecated and will be removed in future Mesa releases. Please use RADV_EXPERIMENTAL=video_decode instead.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
zsh: segmentation fault (core dumped)
I have not altered my NixOS config since previous hardware iteration, where encoding worked, with the exception of adding the AMD bits below.
I would suggest setting some additional ffmpeg options, like verbose logging to see what ffmpeg is trying to do. Additionally you can use -hwaccel to switch between vaapi and vulcan backends to see which is problematic. Finally, you can use -hwaccel_device to figure out if the problem is using the CPU’s media accelerator or the GPU’s accelerator.
Option
Description
-loglevel verbose
Provides detailed information about the processing.
-hwaccel
Specifies the hardware acceleration method to use.
-hwaccel_device
Defines the device to be used for hardware acceleration.
Unfortunately the verbose output doesn’t seem to add anything other than some version information:
radv: RADV_PERFTEST=video_decode is deprecated and will be removed in future Mesa releases. Please use RADV_EXPERIMENTAL=video_decode instead.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
0126-06-30 23:28:16 9FFFF6C0 [AMFDeviceVulkanImpl] Info: Version of the Vulkan driver: 26.1.5
0126-06-30 23:28:16 9FFFF6C0 [AMFDeviceVulkanImpl] Info: Highest version of the Vulkan API that is supported by the physical device: 1.4.354
Segmentation fault (core dumped) ffmpeg -loglevel verbose -hwaccel vaapi -i 1.mp4 -c:v av1_amf -crf 30 -preset 6 -svtav1-params keyint=10s:tune=0:enable-overlays=1 -c:a libopus -b:a 128k 1.mkv
As for switching between vaapi and vulkan, both end in the crash/output above. This is with the GPU . The CPU issue seem unrelated, since it doesn’t produce an instant crash and does work for a while before silently dying.