+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date: Dec 2012
    Location: utah, usa
    Search Comp PM
    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.

    $ ./faac -b 40 -w -o /tmp/yellow-audio-40k.mp4 /tmp/yellow-audio.wavFreeware 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
    Quote Quote  
  2. inactive El Heggunte's Avatar
    Join Date: Jun 2009
    Location: offline
    Search Comp PM
    Hmmm, why do you "have to" use faac only?
    Can't you use NeroAacEnc under WINE for example?

    Keep in mind that lower bitrates sound better/acceptable only with the High-Efficiency mode
    (read: Spectral Band Replication)
    Quote Quote  
  3. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    I tried it with ffmpeg libvo-aacenc instead of libfaac (on windows) and it was able to reach the targets of 40kb/s, 48kb/s AAC . Some AAC encoders have unavailable bitrate options, and only specific numbers work (e.g. you might not be able to use 45kb/s)

    Another option might be to pipe ffmpeg into another aac encoder like neroaac


    see this thread:
    http://forum.videohelp.com/threads/322328-libfaac-encoding-with-ffmpeg

    bat99 is on linux , so either option should work for you on linux
    Quote Quote  
  4. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    I agree with El Heggunte,

    And even to my non-audiophile ears , there is a world of difference between something like neroaac HE-AAC and libfaac in terms of quality, especially at low bitrates
    Quote Quote  
  5. Member
    Join Date: Dec 2012
    Location: utah, usa
    Search Comp PM
    i'm working on an application which already is using libfaac as it's chosen aac encoding library. It would be a fair bit of work to switch libraries. I do wish libfaac supported HE-AAC... maybe I could use the built-in ffmpeg aac encoder
    Quote Quote  
  6. Member
    Join Date: Dec 2012
    Location: utah, usa
    Search Comp PM
    Finally figured it out. In order to encode at bitrates < 64kbps, you must also set the bandwidth:
    -c <freq> 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.
    Quote Quote  
  7. Member bat999's Avatar
    Join Date: Feb 2008
    Location: United Kingdom
    Search Comp PM
    Originally Posted by lightdee View Post
    Finally figured it out... you must also set the bandwidth
    ...you must set it much lower (in my case <5000) to allow libfaac to
    encode at 40kbps or similar.
    Yes, that's done the job.
    I suppose this low bandwidth is OK for speech.

    Code:
    @ubuntu:~$ faac -b 40 -c 4000 -o foo.m4a foo.wav
    Freeware Advanced Audio Coder
    FAAC 1.28
    
    Average bitrate: 40 kbps
    Quantization quality: 100
    Bandwidth: 4000 Hz
    Object type: Low Complexity(MPEG-4) + M/S
    Container format: MPEG-4 File Format (MP4)
    Encoding foo.wav to foo.m4a
       frame          | bitrate | elapsed/estim | play/CPU | ETA
     1297/1297  (100%)|   42.1  |    2.1/2.1    |   14.68x | 0.0
    Quote Quote  



Similar Threads

Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools