ffmpeg -i input.mp4 -c:v h264_nvenc -preset p4 -cq 23 output.mp4

Category: Media & Conversion

ffmpeg -i input.mp4 -c:v h264_nvenc -preset p4 -cq 23 output.mp4

Encode video with the NVIDIA hardware encoder

Encodes using the NVIDIA GPU hardware encoder instead of the CPU, which is much faster but produces larger files at the same quality. -cq 23 works like CRF, with lower meaning better. Only works on machines with an NVIDIA GPU and the nvenc libraries installed.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.