3
votes

I'm creating an app that plays static mpeg-DASH files. I've been using MP4Box to create the DASH .mp4 and .mpd files. The MPD file contains a list of byte range offsets into the single .mp4 file. This works fine, but I've seen implementations where the ranges are individual files.

What I'm wondering is which is the "industry preferred" way of creating DASH files? Is it to have a single .mp4 file with offsets into the file, or to create individual .mp4 files for each segment?

If it's individuals, do each file have initialization content at the beginning, or is there only one init file, and the others are content?

2

2 Answers

1
votes

Since MPEG-DASH has its own complexity, and there are many types of valid mpd files, players that claims they support MPEG-DASH don't support all valid types. One common mpd file that I have seen all players easily support is the one with 'SegmentURL' element - basically, when the fragments are described.
Here is an example: http://www.digitalprimates.net/dash/streams/gpac/mp4-main-multi-mpd-AV-NBS.mpd

As you can see - its initialization is its first fragment, described in 'Initialization' element. This is its manifest principle:

<MPD type="static" xmlns="urn:mpeg:DASH:schema:MPD:2011" minBufferTime="PT1.5S" mediaPresentationDuration="PT0H10M0.00S" profiles="urn:mpeg:dash:profile:isoff-main:2011">
 <ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
  <Title>mp4-main-multi-mpd-AV-NBS.mpd generated by GPAC</Title>
  <Copyright>TelecomParisTech(c)2012</Copyright>
 </ProgramInformation>
 <Period start="PT0S" duration="PT0H10M0.00S">
  <AdaptationSet segmentAlignment="true" maxWidth="1920" maxHeight="1080" maxFrameRate="25" par="16:9">
   <ContentComponent id="1" contentType="video"/>
   <Representation id="h264bl_low" mimeType="video/mp4" codecs="avc1.42c00d" width="320" height="180" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="50877">
    <SegmentList timescale="1000" duration="10000">
     <Initialization sourceURL="mp4-main-multi-h264bl_low-.mp4"/>
    <SegmentURL media="mp4-main-multi-h264bl_low-1.m4s"/>
    <!-- ... Continue with SegmentURL elements -->
    </SegmentList>
   </Representation>
   <!--   Other video Representations    -->
  </AdaptationSet>
  <AdaptationSet segmentAlignment="true" lang="und">
   <ContentComponent id="1" contentType="audio" lang="und"/>
   <Representation id="aaclc_low" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="44100" lang="und" startWithSAP="1" bandwidth="19079">
    <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"/>
    <SegmentList timescale="1000" duration="9520">
     <Initialization sourceURL="mp4-main-multi-aaclc_low-.mp4"/>
    <SegmentURL media="mp4-main-multi-aaclc_low-1.m4s"/>
    <!-- ... Continue with SegmentURL elements -->
    </SegmentList>
   </Representation>  
   <!--   Other video Representations    -->
  </AdaptationSet>
 </Period>
</MPD>
0
votes

Whether a single or multiple media segments is better practice for MPEG DASH depends on the use case.

Here is a situation where multiple media segments could be preferred: One of the content delivery optimizations that MPEG DASH supports is late binding. For example for content with multiple alternative audio tracks (different languages) only the audio language that the user has chosen is delivered. A single segment that contains all audio tracks may have worse HTTP cache efficiency compared to multiple segments (separate for video, and multiple audio tracks).

In the case of multiple segments, a single segment that contains all the initialization info (initialization segment) is recommended.