Skip to content

Instantly share code, notes, and snippets.

@eugrus
Last active June 9, 2023 23:54
Show Gist options
  • Save eugrus/90459ac82e0ee11eaac9cbbe2a676367 to your computer and use it in GitHub Desktop.
Save eugrus/90459ac82e0ee11eaac9cbbe2a676367 to your computer and use it in GitHub Desktop.
Extract audio from MKVs in the folder using ffmpeg
FOR /F "tokens=*" %G IN ('dir /b *.mkv') DO ffmpeg -i "%G" -acodec copy "%~nG.aac"
Get-ChildItem *.mkv | ForEach-Object {ffmpeg -i $_.FullName -acodec copy ($_.BaseName + ".aac")}
for file in *.mkv; do ffmpeg -i "$file" -acodec copy "${file%.*}.aac"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment