Author Topic: BASSenc_AAC (AAC encoding)  (Read 3159 times)

Ian @ un4seen

  • Administrator
  • Posts: 22959
BASSenc_AAC (AAC encoding)
« on: 9 Aug '19 - 16:06 »
Here's a little AAC encoding add-on based on the FDK AAC encoder:

   www.un4seen.com/stuff/bassenc_aac.zip
   www.un4seen.com/stuff/bassenc_aac-linux.zip
   www.un4seen.com/stuff/bassenc_aac-linux-arm.zip
   www.un4seen.com/stuff/bassenc_aac-android.zip

No documentation yet, but the API is the same as the other encoding add-ons, with these "options" settings available:

  --object-type <value> ... "value" can be: 2/5/23/29/39. See here for descriptions: www.wikipedia.org/wiki/MPEG-4_Part_3#MPEG-4_Audio_Object_Types
  --vbr <value> ... "value" can be 0 (CBR) or 1-5 (VBR levels).
  --bitrate <value> ... bitrate (bps) for CBR.

The default is type 2 CBR with the bitrate based on the sample rate and channel count. No tagging or MP4 options currently, so it'll probably be mostly useful for streaming purposes (eg. with BASS_Encode_CastInit and BASS_Encode_ServerInit) rather than file writing.

AAC is patented and a licence is required to use it in commercial products. A licence can be obtained from Via:

   www.via-corp.com/us/en/licensing/aac/overview.html
« Last Edit: 21 Aug '19 - 14:20 by Ian @ un4seen »

Ian @ un4seen

  • Administrator
  • Posts: 22959
Re: BASSenc_AAC (AAC encoding)
« Reply #1 on: 21 Aug '19 - 14:22 »
An Android version has now been added in the 1st post.

kremk

  • Posts: 4
Re: BASSenc_AAC (AAC encoding)
« Reply #2 on: 28 Mar '20 - 14:22 »
Thank you for the add-on, it works very well with object-type 2 and 5 but when I try 29 for Parametric Stereo it returns BASS_ERROR_UNKNOWN on BASS_Encode_AAC_Start. Do I need to set some flags or something before starting? I've tried 24 to 128 bitrates with BASSEncode.BASS_ENCODE_PAUSE flag only.

Ian @ un4seen

  • Administrator
  • Posts: 22959
Re: BASSenc_AAC (AAC encoding)
« Reply #3 on: 30 Mar '20 - 17:54 »
Is the source stream stereo? BASS_Encode_AAC_Start currently gives a BASS_ERROR_UNKNOWN error if not. An extra check has been added for the next update so that it gives a more helpful BASS_ERROR_FORMAT error then instead.

kremk

  • Posts: 4
Re: BASSenc_AAC (AAC encoding)
« Reply #4 on: 31 Mar '20 - 13:56 »
Thank you, stereo was the issue as you said, now it's working well. I just forgot to switch back to stereo after testing speaker flags :)