[FFmpeg-user] How to select GPU in a multi GPU system

DopeLabs dopelabs at dubstep.fm
Tue Jul 5 03:06:53 EEST 2022


hello,

how does one select which GPU to use for hardware acceleration when more than 1 GPU is installed in the system?

some searching seemed to hint at using the -gpu option but it looks like that option has been deprecated? the option does not appear in the man pages or on the documentation pages on the ffmpeg website. trying to use the option seems to fail.

thank you

$ ffmpeg -i test.mov -c:v h264_videotoolbox -gpu 1 test.mp4
ffmpeg version N-107303-g9fec43a92d Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  configuration: --enable-static --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --disable-libjack --disable-indev=jack --enable-libcaca --extra-libs=-liconv --prefix=/opt/miniconda3 --enable-macos-kperf --enable-libkvazaar --disable-shared --pkg-config-flags=--static --enable-neon --enable-nonfree --enable-runtime-cpudetect --enable-postproc --enable-libfdk_aac
  libavutil      57. 27.100 / 57. 27.100
  libavcodec     59. 36.100 / 59. 36.100
  libavformat    59. 26.100 / 59. 26.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter     8. 41.100 /  8. 41.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample   4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Unrecognized option 'gpu'.
Error splitting the argument list: Option not found


More information about the ffmpeg-user mailing list