I am trying to use ffmpeg on ubuntu 13.10 to convert AP3 to MP3?
I installed ffmpeg, but I get this error when I use it. Please tell me how can I fix it?
$ ffmpeg -i CD1_Age_0-3_Baby.ape CD1_Age_0-3_Baby.mp3
ffmpeg version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Nov 9 2013 19:15:22 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, ape, from 'CD1_Age_0-3_Baby.ape':
Metadata:
Album : MOZART EFFECT I - ENLIGHTMENT
Title : C:\[APE SET] Ī����ЧӦ-�������ǵ����� 4CDS\CDImage01
Genre : Classical
Year : 2002
Comment : Exact Audio Copy
Duration: 01:09:17.75, start: 0.000000, bitrate: 656 kb/s
Stream #0.0: Audio: ape, 44100 Hz, stereo, s16
Output #0, mp3, to 'CD1_Age_0-3_Baby.mp3':
Stream #0.0: Audio: [0][0][0][0] / 0x0000, 44100 Hz, stereo, s16, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Encoder (codec id 86017) not found for output stream #0.0
First make sure that you have the
libavcodec-extra-53
package for encoding to mp3 installed.Try to convert the .ape file to .mp3 using ffmpeg and you will get the following message:
This is the same error message that you got in your question. So use
avconv
instead. The avconv program is provided by the libav-tools package from the Ubuntu Software Center. avconv, like ffmpeg, is run from the terminal.This example uses 256kbps bitrate for the output.mp3 file and id3v2_version 3 for the metadata tags. First change directory using the
cd
command to the same directory where your input.ape file to be converted is located. Then run the command:Note: The command:
ffmpeg -i '10 Make Peace.ape' -acodec libmp3lame -b 256k -id3v2_version 3 '10 Make Peace.mp3'
will also do the conversion to mp3 using ffmpeg, but you will get theTHIS PROGRAM IS DEPRECATED
error message. The ffmpeg package is still available in Ubuntu 13.10 and earlier releases.In Ubuntu 14.04, the Libav codec library (additional codecs) package (libavcodec-extra-53) has been updated to libavcodec-extra-54. In Ubuntu 14.10 and 15.04, the Libav codec library (additional codecs) package has been updated to libavcodec-extra-56.
Updates for Ubuntu 15.10 and later
In Ubuntu 15.10 and 16.04, the Libav codec library (additional codecs) package has been updated to libavcodec-ffmpeg-extra56.
In Ubuntu 16.10, 17.04, 17.10 and 18.04 the Libav codec library (additional codecs) package has been updated to libavcodec-extra57.
In Ubuntu 18.10 and 19.04 the Libav codec library (additional codecs) package has been updated to libavcodec-extra58.
You have six main options to encode to MP3 with
ffmpeg
:Avoid the misleading Libav mess that was forced on Ubuntu users and simply download, extract, and execute a recent Linux build of
ffmpeg
. Put it in~/bin
and then re-login. Now when you runffmpeg
it will use this new build. This is the easiest option.Follow a step-by-step guide to compile the real
ffmpeg
with whatever codecs and features you want.Install
ffmpeg
from the Ubuntu Multimedia for Trusty PPA (for 14.04 users).Install the
libavcodec-extra-*
package to enable MP3 encoding via libmp3lame in buggyavconv
or the crappy, old, fakeffmpeg
.Pipe to
lame
and use it to encode:ffmpeg -i input -f wav - | lame - output.mp3
Upgrade Ubuntu and use the
ffmpeg
package from the repo. The realffmpeg
from FFmpeg returned to Ubuntu in Vivid 15.04.Here is another Script that might help folks. What you will need to do is copy it into the root folder of the ape files you want to convert.
With
libav_tools
andlibmp3lame
installed in the directory where ape files are located, type in terminal:With that all ape files in directory convert to mp3 stereo 320kb and tags in ape files are respected.
The script below will convert all wma files to mp3 recursively starting from the path where the find command is executed. Old wma files will be deleted!!!
Script: