Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Dealing with AAC in an RTMP stream (Read 3709 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Dealing with AAC in an RTMP stream

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.