Skip to content

Instantly share code, notes, and snippets.

@nathan-cruz77
Created September 21, 2022 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathan-cruz77/15cfcf8e2c4a1f4e7f38714c33876e7c to your computer and use it in GitHub Desktop.
Save nathan-cruz77/15cfcf8e2c4a1f4e7f38714c33876e7c to your computer and use it in GitHub Desktop.
FFMpeg transcoding with Nvidia acceleration
INPUT=input.mp4
OUTPUT=output.mp4
ffmpeg \
-hwaccel cuda \
-hwaccel_output_format cuda \
-i $INPUT \
-vf 'hwdownload,format=nv12,hwupload' \
-c:a copy \
-c:v h264_nvenc \
$OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment