According to the FFmpeg documentation, -hwaccel_device can be used to select a device for hardware acceleration
Example: ffmpeg -hwaccel qsv -hwaccel_device /dev/dri/renderD129 -c:v h264_qsv \ -i in.h264 -c:v hevc_qsv out.h265 --- fftools/ffmpeg_qsv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fftools/ffmpeg_qsv.c b/fftools/ffmpeg_qsv.c index 960c88b69d..b7e7ab0e53 100644 --- a/fftools/ffmpeg_qsv.c +++ b/fftools/ffmpeg_qsv.c @@ -55,6 +55,14 @@ static int qsv_device_init(InputStream *ist) return err; } +#if CONFIG_VAAPI + else if (ist->hwaccel_device && !strncmp(ist->hwaccel_device, "/dev/dri/", 9)) { + err = av_dict_set(&dict, "child_device", ist->hwaccel_device, 0); + if (err < 0) + return err; + } +#endif + err = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_QSV, ist->hwaccel_device, dict, 0); if (err < 0) { -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".