I need to convert audio files to mp3 using ffmpeg.
When I write the command as ffmpeg -i audio.ogg -acodec mp3 newfile.mp3, I get the error:
ffmpeg -i audio.ogg -acodec mp3 newfile.mp3
<
For batch processing files in folder:
for i in *.wav; do ffmpeg -i "$i" -f mp3 "${i%}.mp3"; done
This script converts all "wav" files in folder to mp3 files and adds mp3 extension
ffmpeg have to be installed. (See other answers)