Last active
April 20, 2024 07:00
-
-
Save kerma/c52e93eef3b3e50d7237 to your computer and use it in GitHub Desktop.
Convert all flac files in folder to m4a using ffmpeg and libfdk_aac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"' _ {} \; |
For me, ffmpeg
also reported Could not find tag for codec h264 in stream #0, codec not currently supported in container
until I added -map a:0
to specify that there shouldn't be a video track. So the final version looked like this:
find . -name '*.flac' -exec sh -c 'ffmpeg -i "$1" -map a:0 -c:a libfdk_aac -b:a 320k "${1%.flac}.m4a"' _ {} \;
Thanks to both of you for the help!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, you must do the following to install ffmpeg with libfdk_aac: