FFmpeg using Cuda

Configure

./configure --enable-cuda-sdk --enable-filter=scale_cuda --enable-filter=thumbnail_cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-x86asm

Build

make -j 10

Example - Extract Frames

ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input.mp4 -vf "hwupload_cuda,thumbnail_cuda=100,hwdownload,format=nv12,fps=1/2" -q:v 2 frames/%05d.jpg