mstorsjo / fdk-aac

A standalone library of the Fraunhofer FDK AAC code from Android.

Home Page:https://sourceforge.net/projects/opencore-amr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to encode a pcm buffer that's length < one aac frame size

Anveena opened this issue · comments

for me:
PS on RTP stream supports PCM,but TS file on HLS stream does not.
So,I have to encode pcm to aac,but simple rate of pcm is 16k, and ps's timeStamp is 100ms,
so I got pcm data length is 16k * 0.1 = 1600
so how can i encode the 1600 bytes to aac,and make it's duration is 0.1

Each AAC frame can only be a full frame. If you want to limit the duration to partial lengths, that information has to be conveyed by the container format somehow. So that's not an issue in fdk-aac but with whatever tool you use to package it. With mp4/m4a there's well defined ways of specifying exactly how much of the encoded data one really should play back, but I'm not aware of any such mechanisms with TS.

But in any case, this is not an issue with fdk-aac but with whatever formats/containers you use.