Re: [ecasound] AAC batch conversion with Ecasound?

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun Nov 01 2009 - 13:46:54 EET


On Thu, 29 Oct 2009, Xavier G wrote:

> Our website members are uploading large mp3 audio files days after days on our servers.
> We currently try to convert on the fly these mp3 files once uploaded with ecasound to aac files
> We use this command
> for i in mp3/*; do ecasound -i resample,96000,$i -o aac/`basename $i .mp3`.aac; done

btw, one thing to note that you lose some audio quality in this conversion
(from one lossy encoding to another, e.g. from mp3 to aac). You are
probably already aware of this, but just as a reminder to others.

> The result is fine, but it seems we get aac files encoded with vbr

Ecasound uses 'faac' utility [1] to encode aac files. You can alter the
bitrate settings by modifying the 'ext-cmd-aac-output' setting in
ecasoundrc. E.g. changing...

> ext-cmd-aac-output = faac -P -o %f -R %s -b 96 -C %c -

... unfortunately, it would seem faac doesn't support CBR mode at all. So
your best bet is to play with '-q' and '-b' to reduce the variance. E.g.
faac 1.24 has options:

Quality-related options:
   -q <quality> Set default variable bitrate (VBR) quantizer quality in percent
                 (default: 100, averages at approx. 120 kbps VBR for a normal
                 stereo input file with 16 bit and 44.1 kHz sample rate; max.
                 value 500, min. 10).Set quantizer quality.
   -b <bitrate> Set average bitrate (ABR) to approximately <bitrate> kbps.
   -c <freq> Set the bandwidth in Hz (default: automatic, i.e. adapts
                 maximum value to input sample rate).

One option would be to plug in another AAC codec to ecasound, but there
are at least no open-source options. One closed-source option is:

... that requires a license for commercial use, but works in Linux. You
can't plug that to ecasound (almost works, but it require a RIFF header
written to its stdin which ecasound cannot do), so you have to run it


Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
Ecasound-list mailing list
Received on Sun Nov 1 16:15:01 2009

This archive was generated by hypermail 2.1.8 : Sun Nov 01 2009 - 16:15:02 EET