Contents of the MP4 sample

Building an MP4 sample from a Dolby Digital Plus bitstream must meet certain conditions.

Each MP4 sample contains one and only one complete Dolby Digital Plus access unit. One access unit consists of all of the parts of the bitstream required by the Dolby Digital Plus decoder to produce 1,536 samples of decoded audio for each audio channel present in the bitstream. A Dolby Digital Plus access unit does not span multiple MP4 samples.

To convert a Dolby Digital Plus stream to Dolby Digital, a decoder uses a correct set of six blocks of audio data to produce one Dolby Digital frame.

How Dolby Digital Plus data is structured within an MP4 sample depends on the configuration of the Dolby Digital Plus bitstream. This figure shows the construction of an MP4 sample that contains a single Dolby Digital Plus access unit consisting of six audio blocks.

Figure: MP4 sample with a single substream with six blocks per frame

MP4 sample with a single substream with six blocks per frame

The six audio blocks represent 1,536 samples of audio from a single substream (substream 0).

This figure shows an MP4 sample that contains a single access unit of Dolby Digital Plus audio consisting of four frames.

Figure: MP4 sample with two substreams with three blocks per frame

MP4 sample with two substreams with three blocks per frame

Each frame contains three audio blocks (denoted AB0 for substream 0 and AB1 for substream 1), each representing 256 samples of PCM audio from all channels in each substream.

This figure shows an MP4 sample that contains a single Dolby Digital Plus access unit consisting of six frames. Each frame contains one audio block, each representing 256 samples of PCM audio from every channel in the substream.

Figure: MP4 sample with a single substream with one block per frame

MP4 sample with a single substream with one block per frame