Convert mp3 file to wav? using the command line?
85,215
Using ffmpeg - installed by default
ffmpeg -i input.mp3 output.wav
Alternative - mpg123
sudo apt-get install mpg123
Then to convert mp3 to wav (using -w option)
mpg123 -w output.wav input.mp3
Related videos on Youtube
Comments
-
TellMeWhy over 1 year
I have an Mp3 file i need to convert to
.wav
to be able to import it into a voice changer program.How do I do this using the command line?
-
kRazzy R about 6 yearsHi ,if possible could you expand it to run on all files in a folder?
-
datakid about 6 years@kRazzyR: for f in ls; do ffmpeg -i $f $(basename $f).wav; done
-
tro about 5 years@datakid Looks like syntax highlighter ate several symbols in your code. I've added your working solution into answer as UPD.
-
scai over 4 years@datakid You should not parse
ls
output. Instead usefor f in *.mp3; do ffmpeg -i "$f" "$(basename $f).wav"; done
. This also includes proper quoting and limits calling ffmpeg for mp3 files only. -
F. Vosnim almost 4 yearsHow to get 32 bit floating point wav with mpg123?
-
Ethan about 2 yearsYou can get 32 bit float wav output by adding the flag: "--encoding f32" or "-e f32"