Skip to content

Instantly share code, notes, and snippets.

@vpetrigo
Created October 11, 2021 16:54
Show Gist options
  • Save vpetrigo/37f85d1b8877782e5da6fc1ef18ff143 to your computer and use it in GitHub Desktop.
Save vpetrigo/37f85d1b8877782e5da6fc1ef18ff143 to your computer and use it in GitHub Desktop.
FFmpeg G2M recording convert with Nvidia CUDA to MP4
param(
[string]$in,
[string]$out
)
if ([string]::IsNullOrEmpty($in) -or [string]::IsNullOrEmpty($out)) {
write-host "Specify input and output filenames"
exit 1
}
ffmpeg -loglevel quiet -stats -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i $in -map 0:2 -map 0:0 -c:v h264_nvenc -c:a aac $out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment