Lossy Audio Compression => AAC => AAC - Tech => Topic started by: briandilley on 2019-09-30 02:37:44

Title: Dealing with AAC in an RTMP stream
Post by: briandilley on 2019-09-30 02:37:44
Hello new friends.

I'm working on an RTMP ingestion server.  Currently I'm trying to figure out how to handle the audio packets.  The audio packets come across as AAC-HE 44kHz in an RTMP message (in this scenario).  They're packed in what I think is called an FLV tag box?  Basically the first byte indicates the codec (AAC in this case) and the second byte indicates whether or not it's a configuration packet.  The configuration packets aren't very useful (I think), and i just ignore them for now since it's the very first audio packet and doesn't contain any audio data.  So far so good - the rest of the RTMP message is the AAC data.  But it doesn't have an ADTS header, so I'm generating one (based on the FFMPEG code).  So now i'm writing these packets (with a generated ADTS header) into a file and trying to play it with mplayer but all I get is static.  I've also tried sending it through a gstreamer pipeline with an aac decoder but it fails to decode as well.

I'm hoping someone here might know some details about the AAC on RTMP that I'm not seeing.

SimplePortal 1.0.0 RC1 © 2008-2021