6

I have AAC-LC audio stream coming directly from audio encoder.

Its a raw stream, No ADTS headers, no container data as I want to stream encoded audio directly as it arrives.(before file gets saved).

I want to determine the frame boundaries/frame lengths/packets lengths in incoming encoded raw AAC stream. (AAC has variable packet lengths.)

Can I search for any fixed frame headers/patterns so that I can determine frame boundaries?

Is it possible with AAC?

Thanks in advance for your valuable inputs.

mrsatish
  • 429
  • 2
  • 7
  • 15

1 Answers1

3

If you are taking AAC encoded data directly from encoder then it's up to encoder to send frame by frame. It should not send "packets", but single frames. Otherwise I don't see a way you can parse for frames.

I'd first check if it really sends more than one frame at a time?

If yes, then one solution would be to tell encoder to send ADTS header, then parse info from ADTS, and finally strip down ADTS from the frame and stream it as raw.

Does that help?

Danijel
  • 8,198
  • 18
  • 69
  • 133
  • 1
    Thanks Danijel. I dont have control on encoder hence I cannot direct it to send raw bitstream along with ADTS headers. Actually I want to stream AAC frames via RTP in realtime. but without finding frame boundaries, I cannot send them with proper framing & time-stamping. – mrsatish Dec 17 '12 at 14:34
  • I am really not sure how to do this... you should have some info from encoder, otherwise I don't see a way. Good place to ask this kind of questions is Hydrogen Audio: http://www.hydrogenaudio.org/forums/index.php?showforum=54 – Danijel Dec 18 '12 at 09:38
  • 1
    Thanks Danijel, I have posted the Question there. http://www.hydrogenaudio.org/forums/index.php?showtopic=98395 – mrsatish Dec 19 '12 at 03:12
  • Not sure it was a good place [hydrogenaudio.org] to post that question, as you didn't get any answer. – Léon Pelletier Aug 28 '13 at 05:26