Live streaming (MPEG-DASH) provide MPD file that contain different segment start time.
I am streaming 9 streams of 3 different resolutions (27 streams total) and i am using Wowza packager.
My MPD file contain 3 adaptation sets and each adaptation set contain a SegmentTimeline (List of segments)-
The first segment have “t” (time) and “d” (duration).
So, totally we have 3 first-segments with “t” attribute (for each adaptation set).
the value of one of them is not equal to the 2 others.
Here is my MPD file:
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
profiles="urn:mpeg:dash:profile:isoff-live:2011"
type="dynamic"
minimumUpdatePeriod="PT1.489S"
publishTime="2019-06-06T12:55:32Z"
availabilityStartTime="2019-06-06T12:15:43Z"
timeShiftBufferDepth="PT25.0S"
suggestedPresentationDelay="PT1.0S"
minBufferTime="PT6.0S">
<ProgramInformation>
<Title>camera1.smil</Title>
</ProgramInformation>
<Location>http://...:1935/..../smil:camera1.smil/manifest_w1997958089.mpd</Location>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" group="1" mimeType="video/mp4" width="3200" height="640" par="1:1" frameRate="30" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<SegmentTemplate timescale="90000" media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_w1997958089_mpd.m4s" initialization="chunk_ctvideo_cfm4s_rid$RepresentationID$_cinit_w1997958089_mpd.m4s">
<SegmentTimeline>
<S t="212758470" d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="p0va0br3000000" codecs="avc1.640033" sar="1:1" bandwidth="3000000" />
<Representation id="p0va0br3100000" codecs="avc1.640033" sar="1:1" bandwidth="3100000" />
<Representation id="p0va0br3500000" codecs="avc1.640033" sar="1:1" bandwidth="3500000" />
<Representation id="p0va0br4200000" codecs="avc1.640033" sar="1:1" bandwidth="4200000" />
<Representation id="p0va0br4300000" codecs="avc1.640033" sar="1:1" bandwidth="4300000" />
<Representation id="p0va0br4150000" codecs="avc1.640033" sar="1:1" bandwidth="4150000" />
<Representation id="p0va0br3400000" codecs="avc1.640033" sar="1:1" bandwidth="3400000" />
<Representation id="p0va0br2900000" codecs="avc1.640033" sar="1:1" bandwidth="2900000" />
<Representation id="p0va0br2800000" codecs="avc1.640033" sar="1:1" bandwidth="2800000" />
</AdaptationSet>
<AdaptationSet id="1" group="1" mimeType="video/mp4" width="3200" height="320" par="1:1" frameRate="30" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<SegmentTemplate timescale="90000" media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_w1997958089_mpd.m4s" initialization="chunk_ctvideo_cfm4s_rid$RepresentationID$_cinit_w1997958089_mpd.m4s">
<SegmentTimeline>
<S t="212713470" d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="p0va1br1310000" codecs="avc1.640033" sar="1:1" bandwidth="1310000" />
<Representation id="p0va1br1320000" codecs="avc1.640033" sar="1:1" bandwidth="1320000" />
<Representation id="p0va1br1340000" codecs="avc1.640033" sar="1:1" bandwidth="1340000" />
<Representation id="p0va1br1840000" codecs="avc1.640033" sar="1:1" bandwidth="1840000" />
<Representation id="p0va1br1850000" codecs="avc1.640033" sar="1:1" bandwidth="1850000" />
<Representation id="p0va1br1860000" codecs="avc1.640033" sar="1:1" bandwidth="1860000" />
<Representation id="p0va1br1870000" codecs="avc1.640033" sar="1:1" bandwidth="1870000" />
<Representation id="p0va1br1380000" codecs="avc1.640033" sar="1:1" bandwidth="1380000" />
<Representation id="p0va1br1390000" codecs="avc1.640033" sar="1:1" bandwidth="1390000" />
</AdaptationSet>
<AdaptationSet id="2" group="1" mimeType="video/mp4" width="3200" height="160" par="1:1" frameRate="30" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<SegmentTemplate timescale="90000" media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_w1997958089_mpd.m4s" initialization="chunk_ctvideo_cfm4s_rid$RepresentationID$_cinit_w1997958089_mpd.m4s">
<SegmentTimeline>
<S t="212758470" d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
<S d="45000"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="p0va2br151000" codecs="avc1.640033" sar="1:1" bandwidth="151000" />
<Representation id="p0va2br252000" codecs="avc1.640033" sar="1:1" bandwidth="252000" />
<Representation id="p0va2br483000" codecs="avc1.640033" sar="1:1" bandwidth="483000" />
<Representation id="p0va2br584000" codecs="avc1.640033" sar="1:1" bandwidth="584000" />
<Representation id="p0va2br585000" codecs="avc1.640033" sar="1:1" bandwidth="585000" />
<Representation id="p0va2br586000" codecs="avc1.640033" sar="1:1" bandwidth="586000" />
<Representation id="p0va2br487000" codecs="avc1.640033" sar="1:1" bandwidth="487000" />
<Representation id="p0va2br258000" codecs="avc1.640033" sar="1:1" bandwidth="258000" />
<Representation id="p0va2br159000" codecs="avc1.640033" sar="1:1" bandwidth="159000" />
</AdaptationSet>
</Period>
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:direct:2014" value="2019-06-06T12:55:32Z"/>
</MPD>
You can see the misalignment:
<code><S t="212758470" d="45000"/>
<code><S t="212713470" d="45000"/>
<code><S t="212758470" d="45000"/>
My questions is:
- This is valid situation?
- If yes, What the reason for this misalignment?
- If no, How can I fix it?
Please note that this misalignment not happened in all MPD’s, its happened sometimes.
My goal is getting exactly same SegmentTemplate for each adaptation set.