Skip to main content

install ffmpeg

install ffmpeg

apt-get install ffmpeg

Convert .wav file to mp3

ffmpeg -i track01.wav -acodec mp3 track01.mp3

You can also specify the bitrate of the MP3 with the -ab flag.

ffmpeg -i track01.wav -acodec mp3 -ab 64k track01.mp3

Convert a folder full of .wav into .mp3

for i in *.wav; do ffmpeg -i "$i" -acodec mp3 -ab 64k "$(basename "$i" .wav)".mp3 ; done