Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of reencoding video using nvenc with metadata removal
# converts all files specified in FileGlob using ffmpeg and nvenc
function ConvertWith-Nvenc(parameter(mandatory=$true)[string]$FileGlob){ # FileGlob can contain path and wildcards
$OutputDir = "$(Split-Path -Parent "$FileGlob")\out"
mkdir "$OutputDir"
foreach($vid in (gi "$FileGlob")){
echo "converting $vid..."
ffmpeg -i "$($" -c:v h264_nvenc -preset slow `
-ac 2 -c:a aac -strict -2 -b:a 128k `
-map_metadata -1 `
ConvertWith-Nvenc "c:\some_path\*.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.