Linux convert AIFF to mp3

You can convert AIFF files to MP3 using ffmpeg on linux. This works with many other inputs and not just AIFF but in the instance I was testing I needed to convert AIFF.

First you need ffmpeg and libmp3lame which on Ubuntu and Linux Mint can be done with

sudo apt-get install libavcodec-extra-53 ffmpeg

Then use ffmpeg to do the conversion replacing INPUT.aiff and OUTPUT.mp3

ffmpeg -i INPUT.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 OUTPUT.mp3

Sample,

scott@scott:~/Music$ ffmpeg -i INPUT.mp3 -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 OUTPUT.mp3
ffmpeg version 0.7.3-4:0.7.3-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
built on Jan 4 2012 16:08:51 with gcc 4.6.1
configuration: –extra-version=’4:0.7.3-0ubuntu0.11.10.1′ –arch=amd64 –prefix=/usr –enable-vdpau –enable-bzlib –enable-libgsm –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libvorbis –enable-pthreads –enable-zlib –enable-libvpx –enable-runtime-cpudetect –enable-vaapi –enable-gpl –enable-postproc –enable-swscale –enable-x11grab –enable-libdc1394 –enable-shared –disable-static
WARNING: library configuration mismatch
avutil configuration: –extra-version=’4:0.7.3ubuntu0.11.10.1+medibuntu1′ –arch=amd64 –prefix=/usr –enable-vdpau –enable-bzlib –enable-libgsm –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libvorbis –enable-pthreads –enable-zlib –enable-libvpx –enable-runtime-cpudetect –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-version3 –enable-vaapi –enable-libopenjpeg –enable-libfaac –enable-nonfree –enable-gpl –enable-postproc –enable-swscale –enable-x11grab –enable-libdirac –enable-libmp3lame –enable-librtmp –enable-libx264 –enable-libxvid –enable-libopencore-amrnb –enable-version3 –enable-libopencore-amrwb –enable-version3 –enable-libvo-aacenc –enable-version3 –enable-libvo-amrwbenc –enable-version3 –enable-libdc1394 –enable-shared –disable-static
avcodec configuration: –extra-version=’4:0.7.3ubuntu0.11.10.1+medibuntu1′ –arch=amd64 –prefix=/usr –enable-vdpau –enable-bzlib –enable-libgsm –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libvorbis –enable-pthreads –enable-zlib –enable-libvpx –enable-runtime-cpudetect –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-version3 –enable-vaapi –enable-libopenjpeg –enable-libfaac –enable-nonfree –enable-gpl –enable-postproc –enable-swscale –enable-x11grab –enable-libdirac –enable-libmp3lame –enable-librtmp –enable-libx264 –enable-libxvid –enable-libopencore-amrnb –enable-version3 –enable-libopencore-amrwb –enable-version3 –enable-libvo-aacenc –enable-version3 –enable-libvo-amrwbenc –enable-version3 –enable-libdc1394 –enable-shared –disable-static
libavutil 51. 7. 0 / 51. 7. 0
libavcodec 53. 6. 0 / 53. 6. 0
libavformat 53. 3. 0 / 53. 3. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 4. 0 / 2. 4. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 52. 0. 0 / 52. 0. 0
[aiff @ 0x100d560] max_analyze_duration reached
Input #0, aiff, from ‘INPUT.aiff’:
Duration: 00:53:17.08, start: 0.000000, bitrate: 1411 kb/s
Stream #0.0: Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, mp3, to ‘OUTPUT.mp3’:
Metadata:
TSSE : Lavf53.3.0
Stream #0.0: Audio: libmp3lame, 44100 Hz, 2 channels, s16, 192 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
size= 74933kB time=3197.13 bitrate= 192.0kbits/s
video:0kB audio:74933kB global headers:0kB muxing overhead 0.000042%