4

I'm trying to encode some audio on Ubuntu 12.04 Linux. I need to use libfaac (using version 1.28) to encode and I want to encode at a very low bitrate - the total including transport stream overhead must be below 64kbps. The input audio is: PCM, 48kHz, 2 channel, s16, 1536 kb/s

Using the faac command-line tool, I get the output below, encoding 5 minutes of audio - so there's plenty of time for the bitrate to average out. I cannot get it to go below 64kbps, or above 165kbps for that matter. I have tried setting some of the other parameters, but to no avail. When I set the bitrate > 64, it works fine. Looking through the libfaac code, i don't see anywhere that these limits are being imposed.

$ ./faac -b 40 -w -o /tmp/yellow-audio-40k.mp4 /tmp/yellow-audio.wav
Freeware Advanced Audio Coder
FAAC 1.28

Average bitrate: 64 kbps
Quantization quality: 100
Bandwidth: 5442 Hz
Object type: Low Complexity(MPEG-4) + M/S
Container format: MPEG-4 File Format (MP4)
Encoding /tmp/yellow-audio.wav to /tmp/yellow-audio-40k.mp4
frame | bitrate | elapsed/estim | play/CPU | ETA
14063/14063 (100%)| 64.2 | 10.7/10.7 | 27.91x | 0.0
$ mediainfo /tmp/yellow-audio-40k.mp4
General
Complete name : /tmp/yellow-audio-40k.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 2.35 MiB
Duration : 5mn 0s
Overall bit rate mode : Variable
Overall bit rate : 65.7 Kbps
Encoded date : UTC 2012-12-05 00:03:38
Tagged date : UTC 2012-12-05 00:03:49
Writing application : FAAC 1.28

Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 5mn 0s
Bit rate mode : Variable
Bit rate : 64.2 Kbps
Maximum bit rate : 73.7 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 2.30 MiB (98%)
Language : English
Encoded date : UTC 2012-12-05 00:03:38
Tagged date : UTC 2012-12-05 00:03:49
vbence
  • 20,084
  • 9
  • 69
  • 118
lightdee
  • 487
  • 4
  • 11
  • 1
    figured it out looking through the source (give thanks for open source) - to encode at bitrates < 64kbps, you must also set the bandwidth: -c Set the bandwidth in Hz. (default=automatic) the bitrate and bandwidth parameters work in tandem to generate an output bitrate. It's automatically set to about 1/2 of the sample rate, but you must set it much lower (in my case <5000) to allow libfaac to encode at 40kbps or similar. – lightdee Dec 05 '12 at 23:23

0 Answers0