AAC/HE-AAC encoding is done with qaac. qaac is based on the high quality audio encoding in Apple Quicktime. Although Quicktime is not Open Source, it provides audio quality that is currently unmatched by Open Source software.
qaac is a Windows application. It is possible to run qaac using wine on Mac OSX and Linux but this is beyond the scope of this guide.
- Apple Quicktime (pro version is not required) - http://www.apple.com/quicktime/
- qaac - Windows Source Code
ADTS and LATM are the most common delivery formats for AAC/HE-AAC audio in broadcast. Although ADTS is strictly speaking not compatible with the DVB specifications, it is commonly used owing to the cumbersome nature of LATM. qaac can encode to both formats and OBE-VoD can encapsulate both.
The file extension for ADTS is .aac. LATM has the file extension .latm.
Your input must be in a .wav file. FFmpeg can convert most audio formats to .wav. Broadcast applications have an output sample rate of 48000Hz.
NOTE: owing to a bug in recent Quicktime versions, multichannel audio must have AAC channel order. (C,L,R,LS,RS). It is hoped Apple will fix this bug and allow normal channel order.
All examples will be shown in ADTS mode. To use LATM you will need to replace:
--adts -o out.aac
--latm -o out.latm
AAC-LC encoding is recommended for the highest quality except where bandwidth constraints apply.
qaac in.wav -c XXX -r keep --adts -o out.aac
Replace XXX with your desired bitrate in kilobits per second. For 2 channel audio a bitrate of 128-160kbps is recommended. For 6 channel audio a bitrate of 256-320kbps is recommended.
HE-AAC (aka AACPlus) is recommended for low bitrate applications
qaac in.wav -c XXX -r keep --he --adts -o out.aac
Replace XXX with your desired bitrate in kilobits per second. For 2 channel audio a bitrate of 64-96kbps is recommended. For 6 channel audio a bitrate of 128-160kbps is recommended.
The output files from each will soon be possible to mux using OBE-VoD. It is important that ADTS files have a .aac file extension and LATM files have a .latm extension.