Skip to content

Instantly share code, notes, and snippets.

@salverde
Forked from kerma/convert_flac_to_aac.sh
Created January 13, 2022 11:07
Show Gist options
  • Save salverde/99bea0a416c88299c80951ca65bcf7e8 to your computer and use it in GitHub Desktop.
Save salverde/99bea0a416c88299c80951ca65bcf7e8 to your computer and use it in GitHub Desktop.
Convert all flac files in folder to m4a using ffmpeg and libfdk_aac
# on os x use brew to get ffmpeg with libfdk_aac
brew install ffmpeg --with-fdk-aac
# convert and use m4a as file extension
find . -name '*.flac' -exec sh -c 'ffmpeg -i "$1" -c:a libfdk_aac -b:a 320k "${1%.flac}.m4a"' _ {} \;
@salverde
Copy link
Author

salverde commented Jan 13, 2022

find . -name '*.flac' -exec sh -c 'ffmpeg -i "$1" -map a:0 -c:a libfdk_aac -b:a 320k "${1%.flac}.m4a"' _ {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment