2

I have several AAC files that were converted from CAF files, for use in HTTP Live Streaming. The stream works, however there is a small gap between each AAC file. It is my understanding that this gap is caused by the "Priming" and "Remainder" frames that are attached to AAC files when they are transcoded from CAFs.

My question is, is there any way to remove this gap? Or use FFMpeg to wrap the files, (possibly in m4a?) so that audio players (VLC, JWPlayer) will understand to skip the gap?

MouseTech
  • 110
  • 2
  • 8

1 Answers1

1

You can try to remove the priming frames. The stream will still be playable (all AAC frames are randomly accessible, assuming you have ADTS headers) but this may cause a some 'lost' audio while the encoder warms up. It may or may not be perceivable. The best way to do this is concatenate the audio in the raw form, so decode the CAFs to raw PCMs concatenation the PCM and encode the AAC into one file.

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • The problem with doing that is that this must be done on iOS and uploaded to a server in real time. I can't wait until the AAC is complete, I must upload it in segments as it is received by the device's (eg. iPhone)'s microphone. – MouseTech Mar 17 '14 at 07:11
  • Don't wait until it is complete. Sent it in pieces as it becomes available. – szatmary Mar 17 '14 at 15:51
  • I'm not sure I follow. Decode the incoming CAFs to raw PCMS, concat the PCMS together then encode the concat'd file into a single AAC file. Wouldn't that leave me with one big AAC file to be sent to the server? – MouseTech Mar 18 '14 at 15:14
  • Skip the 'file' step. Once decoded, treat everything as a stream. – szatmary Mar 18 '14 at 18:00