Skip to content

Instantly share code, notes, and snippets.

@xbill82
Created May 29, 2022 16:45
Show Gist options
  • Save xbill82/fc887bce5772f71417ad7393b49b1303 to your computer and use it in GitHub Desktop.
Save xbill82/fc887bce5772f71417ad7393b49b1303 to your computer and use it in GitHub Desktop.
Recursively convert FLAC files to AAC using ffmpeg
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
FILES=$(find . -type f -name '*.flac')
for f in $FILES
do
ffmpeg -i $f -c:a aac "${f%.flac}.aac" < /dev/null
done
IFS=$SAVEIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment