ffmpeg_hw: make hardware selection for filters more user friendly

Multimedia / FFmpeg - Haihao Xiang [intel.com] - 12 September 2021 16:33 UTC

When a device is derived from a source device, there are at least 2 devices, and usually the derived device is the expected device, so let's pick the last device if user doesn't specify the filter device with filter_hw_device option

After applying this patch, the command below can work:

$> ffmpeg -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device qsv=hw@va -f lavfi -i yuvtestsrc -vf format=nv12,hwupload=extra_hw_frames=64 -c:v h264_qsv -y out.h264

6803d8b440 ffmpeg_hw: make hardware selection for filters more user friendly
fftools/ffmpeg_hw.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

  • Share