From 1a79b8f8d2b5d26c60c237d6e585873238e46914 Mon Sep 17 00:00:00 2001 From: Zhengxu Date: Thu, 5 Jan 2017 14:48:06 +0800 Subject: ffmpeg: Add an option "qsv_device" to choose proper node for QSV child device (vaapi or dxva2) Reason: For some cases, such as 2 or more graphics cards existing, the default command line may fail because ffmpeg does not open the correct device node: ffmpeg -hwaccel qsv -c:v h264_qsv -i test.264 -c:v h264_qsv out.264 Let user choose the proper one by running like below: ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv \ -i test.264 -c:v h264_qsv out.264 Signed-off-by: ChaoX A Liu Signed-off-by: Huang, Zhengxu Signed-off-by: Andrew, Zhang Signed-off-by: Mark Thompson --- ffmpeg_opt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ffmpeg_opt.c') diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 6862456c27..a4b8d24991 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -3679,5 +3679,10 @@ const OptionDef options[] = { "set VAAPI hardware device (DRM path or X11 display name)", "device" }, #endif +#if CONFIG_QSV + { "qsv_device", HAS_ARG | OPT_STRING | OPT_EXPERT, { &qsv_device }, + "set QSV hardware device (DirectX adapter index, DRM path or X11 display name)", "device"}, +#endif + { NULL, }, }; -- cgit v1.2.3