How do I correctly select the GPU ID for the `-init_hw_device vulkan=vk:` parameter?
Hello everyone. I am running FFmpeg on a system with three GPUs: an Intel iGPU, an RX 6400, and an RTX 3060. Here is my FFmpeg command line:
[ argumentosString ] -init_hw_device vulkan=vk:0 -filter_hw_device vk -v repeat+error -i "D:\OBS\record\teste.mp4" -vf "hwupload,libplacebo=w=1920:h=1080:colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=limited:custom_shader_path='D\:/upscale/shaders/shader.glsl',hwdownload,format=yuv420p" -fps_mode passthrough -c:v h264_amf -rc cqp -qp_i 19 -qp_p 21 -tag:v avc1 -c:a copy -y -gpu 0 "D:\OBS\record\teste_process.mp4"
The `-gpu` parameter specifies which GPU to use for encoding, while the `-init_hw_device vulkan=vk:0` parameter specifies which GPU runs the shader. To my surprise, when using the value `0` for both parameters, I discovered that this value does not point to the same GPU; I see a scenario where the shader runs on the RX 6400 while the encoding takes place on the RTX 3060. This happens because the GPU ordering differs for each of these parameters.
Can anyone help me?