FFMPEG able to convert m4a -> mp3, but unable to convert mp3 -> mp3?

1

FYI: Fedora 8 running on Amazon EC2...

Having a difficult time with FFmpeg doing a (what should be pretty simple) conversion. I can get FFmpeg to encode an mp3 file from an m4a file using the following:

ffmpeg -i /file1.m4a -acodec libmp3lame -ab 160k /file2.mp3

However, I cannot get it to to convert an mp3 -> mp3, it responds with "Unknown Format" using the following:

   ffmpeg -i /file1.mp3 -acodec libmp3lame -ab 160k /file2.mp3

I get the following command string:

FFmpeg version UNKNOWN, Copyright (c) 2000-2008 Fabrice Bellard, et al.


configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include/ffmpeg --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaad --enable-libfaac --enable-libgsm --enable-libxvid --enable-libx264 --enable-liba52 --enable-liba52bin --enable-pp --enable-shared --enable-pthreads --enable-gpl --disable-strip
  libavutil version: 49.6.0
  libavcodec version: 51.50.1
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Feb 14 2008 17:47:08, gcc: 4.1.2 20070925 (Red Hat 4.1.2-33)
/file1.mp3: Unknown format

Edit for clarity: The input file is in /ebs/queue/input.mp3 and the output is /ebs/converted/output.mp3

Jonathan Coe

Posted 2011-10-31T15:59:09.290

Reputation: 111

Answers

2

Check your installed codecs with

ffmpeg -codecs | grep mp3

The problem is most likely that libmp3lame only allows encoding, and for decoding, you need another alternative.

For example, this is the output on my system. E is for encoding, D for decoding capabilities.

  EA    libmp3lame      libmp3lame 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    mp3adufloat     ADU (Application Data Unit) MP3 (MPEG audio layer 3)
 D A    mp3float        MP3 (MPEG audio layer 3)
 D A    mp3on4          MP3onMP4
 D A    mp3on4float     MP3onMP4

I consider this a basic feature of FFmpeg, so you might want to recompile from source.

slhck

Posted 2011-10-31T15:59:09.290

Reputation: 182 472