

$ ffmpeg -hwaccel cuvid -c:v h264_cuvid -i INPUT -vcodec h264_nvenc -b:v 5M OUTPUTįFmpeg resize using CUDA scale (filter scale_cuda is GPU accelerated video resizer ), full hardware transcoding example: $ ffmpeg -hwaccel cuvid -c:v h264_cuvid -i INPUT -vf scale_cuda=-1:720 -vcodec h264_nvenc -acodec copy OUTPUT Encoding using h264 NVENC video encoder: $ ffmpeg -i INPUT -vcodec h264_nvenc -b:v 5M -acodec copy OUTPUT Full hardware transcoding with using CUVID and NVENC: $ ffmpeg -hwaccel cuvid -c:v h264_cuvid -i INPUT -vcodec h264_nvenc -preset slow OUTPUT Here is some examples how to use NVENC encoder.

How To Compile FFmpeg With NVENC H264 Hardware Encoder. For using FFmpeg hardware acceleration you need compile FFmpeg with NVIDIA NVENC support.
