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

Ian @ un4seen

  • Administrator
  • Posts: 23924
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: 23924
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: 23924
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 :)

scarboni

  • Posts: 53
Re: BASSenc_AAC (AAC encoding)
« Reply #5 on: 18 Feb '21 - 14:09 »
Hello ! I see that there is no library file for macos, but, it is also written that " The AAC/MP4 format is supported as standard by BASS via the OS's codecs on macOS and iOS", what does that mean exactly if we want to encode using AAC ?

Thank you !

Ian @ un4seen

  • Administrator
  • Posts: 23924
Re: BASSenc_AAC (AAC encoding)
« Reply #6 on: 18 Feb '21 - 16:05 »
The BASSenc_AAC add-on isn't currently available for macOS/iOS because they provide AAC encoding support as standard, which can be accessed via BASSenc's BASS_Encode_StartCA and BASS_Encode_StartCAFile functions. Please see the BASSenc documentation for details. You can also check the CONVERT.C example that's included in the BASSenc package for a little demonstration.

lordbarba

  • Posts: 11
Re: BASSenc_AAC (AAC encoding)
« Reply #7 on: 19 May '21 - 14:14 »
Does it work as AAC+ encoder on arm architecture?

Ian @ un4seen

  • Administrator
  • Posts: 23924
Re: BASSenc_AAC (AAC encoding)
« Reply #8 on: 19 May '21 - 15:54 »
Yes, it should do. You whould put "--object-type 5" in the options for HE-AAC.