Skip to content

Instantly share code, notes, and snippets.

@OliverRC
Created August 7, 2014 18:55
Show Gist options
  • Save OliverRC/5eedb6cedfbb34f40162 to your computer and use it in GitHub Desktop.
Save OliverRC/5eedb6cedfbb34f40162 to your computer and use it in GitHub Desktop.
A small script that uses ffmpeg to convert mp4 video to mp3
$files = Get-ChildItem -Path . -Filter *.mp4
foreach($file in $files)
{
$filename = $file.name
$basename = $file.BaseName
$command = "ffmpeg -i `"$filename`" -codec:a libmp3lame -q:a 0 `"$basename.mp3`""
Write-Host $command
Invoke-Expression $command
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment