0
votes

I have an original video coded in several resolutions with its associated bitrates:

CanalMetroLivinglab3DTV-HD-Musica_384x216.mp4
CanalMetroLivinglab3DTV-HD-Musica_640x360.mp4
CanalMetroLivinglab3DTV-HD-Musica_720x406.mp4
CanalMetroLivinglab3DTV-HD-Musica_1280x720.mp4 
CanalMetroLivinglab3DTV-HD-Musica_1920x1080.mp4

I used GPAC MP4 Box to split into segments these contents and to create the MPD file as follows:

MP4Box -dash 1000 -rap -segment-name %s_ -out CanalMetroLivinglab3DTV-HD-Musica.mpd ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_384x216.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_640x360.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_720x406.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_1280x720.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_1920x1080.mp4 

I obtained the following manifest file:(it isn't complete)

    <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500000S" type="static" mediaPresentationDuration="PT0H0M45.02S" profiles="urn:mpeg:dash:profile:full:2011">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>
CanalMetroLivinglab3DTV-HD-Musica.mpd generated by GPAC
</Title>
</ProgramInformation>
<Period duration="PT0H0M45.02S">
<AdaptationSet segmentAlignment="true" bitstreamSwitching="true" maxWidth="1920" maxHeight="1080" maxFrameRate="25" par="16:9" lang="eng">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<ContentComponent id="1" contentType="video"/>
<ContentComponent id="2" contentType="audio"/>
<SegmentList>
<Initialization sourceURL="CanalMetroLivinglab3DTV-HD-Musica_init.mp4"/>
</SegmentList>
<Representation id="1" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="384" height="216" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="479651">...</Representation>
<Representation id="2" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="640" height="360" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="930072">...</Representation>
<Representation id="3" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="720" height="408" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="1123428">...</Representation>
<Representation id="4" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1280" height="720" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="2470344">...</Representation>
<Representation id="5" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1920" height="1080" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="4327645">
<SegmentList timescale="1000" duration="1001">
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_1.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_2.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_3.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_4.m4s"/>
    ...
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_42.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_43.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_44.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_45.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>

However, I have several questions:

  • First, I think there should be an initialization segment for each representation and it will be listed in the first position of the SegmentList. How can I do it?

  • Second, in my case all segments (.m4s), the initialization segment(.mp4) and the manifest file (.mpd) are stored in the same location in a server. According to this, isn't it neccessary the Base-URL element?

  • In other DASH sequences that I saw, all the segments of each representation are stored in an independent folder together to its associated initialization segment and the manifest file of that representation. And then, there is a global MPD. What parameters of MP4 Box do I have to use to do it in this way?

Thank you!

1

1 Answers

1
votes

First Question: It seems that GPAC is using only one initialization segment that contains all initialization information for all representations. Therefore a SegmentList element with the Initialization element is present in the AdaptationSet element. According to the MPEG-DASH standard, this technique is used to express default values and all SegmentList elements inside of the Representation elements will inherit the attributes and elements from the higher level SegmentList. Basically this means that each SegmentList on the Representation level contains an initialization segment.

Second Question: If no BaseUrl element is present on the MPD level then all requests will be relative to the MPD location. So if the MPD is located on the same server there is no need to use a BaseUrl. It makes it also more comfortable when you move the content from one folder to another because you do not need to modify the MPD, i.e., changing the BaseUrl.

Third Question: This is possible and other services are structuring the content in that way and using SegmentTemplate, while providing MPDs for all individual Representations. This makes it easier to remove or add Representations. With MP4Box you can use the -segment-name flag and enable a subdirectory for each Representation with, e.g., $RepresentationID$/CanalMetroLivinglab3DTV-HD-Musica_$Number$.m4s. Anyway there is no need to do it like that. I would strongly recommend to use SegmentTemplate as it makes your MPD more compact (less bytes, reduces startup delay). Possible with MP4Box and the -url-template flag. Btw. your content as generated with MP4Box seems valid, at least from the MPEG-DASH MPD perspective. You can always check if your MPD is valid with the MPD-Validator from the University Klagenfurt.