Last active
August 26, 2024 00:13
-
-
Save mmenavas/cc68800243d6d8f6732ce2725ac47292 to your computer and use it in GitHub Desktop.
Convert m4a files to mp3
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
#!/bin/bash | |
# Create "input" and "output" directories. Place m4a files in "input" directory. Run `bash m4a2mp3` and the new mp3 files will be stored in "output". | |
cd ./input | |
for filename in ./*; do | |
tmp="${filename/.m4a/}"; | |
echo Converting: "$tmp"; | |
ffmpeg -v 5 -y -i "$filename" -acodec libmp3lame -ac 2 -ab 128k ../output/"$tmp".mp3; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment