Skip to content

Instantly share code, notes, and snippets.

@passuf
Last active April 28, 2017 08:40
Show Gist options
  • Save passuf/80d39d5bb0c194a9b490 to your computer and use it in GitHub Desktop.
Save passuf/80d39d5bb0c194a9b490 to your computer and use it in GitHub Desktop.
# Ubuntu 14.04 and 14.10
sudo apt-get install libav-tools
mkdir mp3 && for f in *.flac; do avconv -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 mp3/"${f%.*}".mp3; done
# To convert m4a files into mp3
mkdir mp3 && for f in *.m4a; do avconv -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 mp3/"${f%.*}".mp3; done
# Other Ubuntu versions with ffmpeg available
sudo apt-get install ffmpeg
mkdir mp3 && for f in *.flac; do ffmpeg -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 mp3/"${f%.*}".mp3; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment