I am writing a custom fragmented MPEG-4 sink in media foundation. I have been able to figure out and get info on nearly everything but I am stuck on the bufferSizeDB item for an audio AAC "esds" container. The bitRateBox used in MP4 format includes the bufferSizeDB member to assist decoders. Does anyone know how this value is calculated or what the guidelines there are for setting it?
Asked
Active
Viewed 268 times
2
-
It seems you need to read ISO/IEC14496-1 – mofo77 Jun 22 '20 at 22:15
-
I would say it is the max buffer size of your audio data in byte, inside an elementary stream. During muxing, check this value. – mofo77 Jun 22 '20 at 22:42
-
@mofo77 ISO/IEC14496-1 does not specify the details sufficiently. I encoded an MP4 file and used the mp4 file viewer to look at the value. For AAC 44100 samples/s at 96kbits/s it indicated bufferSizeDB=6144 bytes. AAC has frame sizes of 1024 samples. So the bytes/frame = (1024 samples/frame * 12000 bytes/s)/44100 samples/s = 279. The 6144 bytes implies a buffer size containing approx 22 AAC frames. But I still don't know where the choice of 22 frames came from? – Keith Jun 24 '20 at 07:42
-
1Ok. Perhaps explore this : ISO/IEC 13818-7 (total decoder input buffer size is 6144 bit multiplied by the number of channels). – mofo77 Jun 24 '20 at 18:17
-
@mofo77 Much appreciated, I've got it now. This is exactly what I was looking for. Thank you for your help. – Keith Jun 25 '20 at 08:41