BASSenc_AAC (AAC encoding)

Started by Ian @ un4seen,

GTHvidsten

I'm struggling getting custom bitrates with this (v0.0.0.3).
Using the BASS.NET wrapper I'm creating the AAC encoder like this:

var encoder = new EncoderBassEnc_Aac(myMixer)
{
    FDKAAC_ConstantBitrate = 320 * 1024,
    UseAsyncQueue = true
};

(I've also tried multiplying by "1000")

No matter which bitrate I'm setting this results in a variable bitrate averaging 128k (Winamp reports it fluctuating between 125 and 133 kbps).
Trying to use Profile (object type) = 5 (HE_AAC) and the bitrate changes to an average of 64k regardless of the bitrate setting.
Changing the VBRMode to 1 has no effect.

How can I modify the bitrate?

Ian @ un4seen

I'm not seeing a problem here when using the "--bitrate" option with BASS_Encode_AAC_Start, so to check if it's a problem with BASS.Net's EncoderBassEnc_Aac wrapper class, please try using BASS_Encode_AAC_Start directly instead:

encoder = BassEnc_Aac.BASS_Encode_AAC_Start(myMixer, "--bitrate 320000", BASSEncode.BASS_ENCODE_QUEUE, null, IntPtr.Zero);

GTHvidsten

Using that command gives me an average of 320kbps in Winamp. It still varies a bit, though, so it's not 100% constant, but it at least matches what I've seen from other encoders at other times.

So I guess there's a problem with BASS.Net.

GTHvidsten

Decompiling the EncoderBassEnc_Aac class I can see it has a method BuildEncoderCommandLine() which doesn't build it up correctly. The bitrate is never set if CBR is chosen.

radio42

Correct, there is a bug in the EncoderBassEnc_Aac class - it will be fixed asap by tomorrow!

radio42

An update is up on this page - Bass.Net v2.4.17.8 - which fixed the command-line for the EncoderBassEnc_Aac