Reputation: 8727
We have an m4a audio file a container for a AAC encoded audio (container stream is mpeg-4, audio stream is AAC).
We are transmitting this file in pieces (just breaking it randomly, at our size limit, and transmitting those bytes) between 2 systems.
If a piece never gets sent, then how do I reconstitute the pieces so at least some of it is playable?
What I've found so far is that if I break up the file and send it I can reconstitute it if I have all the pieces (of course), but if I leave a piece out, no audio tool recognizes it or can play it.
What is the correct way to do this? How is m4a a streamable format if I need all the pieces?
Edit: to clarify we are recording audio on limited IoT devices and sending the recordings to the cloud for later playback. We have max upload size of 128kb. We could simply save the raw audio into many small m4a files originally and just upload those but isn't there some wastage there with all the meta-data in each file? Like we want 30s of audio but save that into 10, 3s m4a files instead of one 30s m4a file that we split up?
Upvotes: 1
Views: 867
Reputation: 8274
I'd extract your AAC stream out of your MPEG-4 (m4a) container and put your AAC into ADTS (Audio Data Transport Stream). ADTS consists of small frames and each frame has a header followed by AAC audio data (similar to an MP3 stream). ADTS is self synchronizing and is designed for packet loss - for example for over the air transmission.
Upvotes: 1