Skip to content

Instantly share code, notes, and snippets.

@mtlynch
Created November 10, 2023 22:14
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 mtlynch/cac60167f96f10aa2f01fa99cce42255 to your computer and use it in GitHub Desktop.
Save mtlynch/cac60167f96f10aa2f01fa99cce42255 to your computer and use it in GitHub Desktop.
param (
[string]$inputFile,
[string]$outputFile
)
if (-not (Test-Path $inputFile)) {
Write-Host "Input file '$inputFile' not found."
Exit 1
}
$ffmpegCommand = "ffmpeg -i `"$inputFile`" -c:v libx264 -crf 23 -c:a aac -movflags faststart `"$outputFile`""
Invoke-Expression $ffmpegCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment