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 version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Jun 24 2010 14:56:20, gcc: 4.4.1
Input #0, mp3, from 'ZHRE.mp3':
Duration: 00:04:12.52, start: 0.000000, bitrate: 208 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 256 kb/s
Output #0, mp3, to 'audio.mp3':
Stream #0.0: Audio: 0x0000, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0
I also ran this command :
ffmpeg -formats | grep mp3
and got this in response:
FFmpeg version 0.5.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Jun 24 2010 14:56:20, gcc: 4.4.1
DE mp3 MPEG audio layer 3
D A mp3 MP3 (MPEG audio layer 3)
D A mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A mp3on4 MP3onMP4
text2movsub remove_extra noise mov2textsub mp3decomp mp3comp mjpegadump imxdump h264_mp4toannexb dump_extra
I guess that the mp3 codec isnt installed. Am I right here ? Can anyone help me out here ?
1) wav to mp3
2) ogg to mp3
3) ac3 to mp3
4) aac to mp3
Get all ffmpeg conversion formats here.
For batch processing with files in folder aiming for 190 VBR and file extension = .mp3 instead of .ac3.mp3 you can use the following code
Change .ac3 to whatever the source audio format is.
ffmpeg mp3 settings
I had to purge my ffmpeg and then install another one from a ppa:
Then convert:
Try FFmpeg Static Build Link
Documentation: https://www.johnvansickle.com/ffmpeg/
Host the static build on your server in same directory