DASH ideas for improvement
Posted: 27 Jan 2012 21:23
I've been writing a DASH segmentation engine recently. I was using VLC for the early tests, but then the people on the client side of the project rejected my segment sets.
The MPD syntax used by VLC is old. The latest DASH draft I have (ISO 23009-1 dated 2011-08-30) has changed a couple of tags and a lot of attributes.
Group becomes AdaptationSet
InitialisationSegmentURL becomes Initialisation
Url@sourceURL becomes SegmentURL@media
the MPD@xmlns and @profiles are different.
VLC also malfunctions (by failing to play audio) if the ISOFF segments are too long (10 seconds appears to be the limit). I suspect this is because access units pointed at by a trun atom have to be contiguous per-track, so it's "all video" followed by "all audio" and if the player can't fit the entire file into its buffer, it would have to issue two HTTP requests for different byte ranges to be able to stream both audio and video.
The client I was targeting actually requires separate audio and video segments (instead of the "multiplexed" segments used by VLC). One AdaptationSet has video and a second AdaptationSet has audio. This works around the need to use advanced HTTP techniques from 1999. Unfortunately, VLC does not appear to handle unmultiplexed audio and video. When I generated old-syntax MPD files with unmultiplexed segments and fed them to VLC it failed to play giving errors like "could not find corresponding trex".
Another oddness I noticed in the VLC DASH samples is the data_offset field in the trun box. In the first trun it is correct (e.g. 4076), but in the second it is 0. I think the spec says that a zero would point at the beginning of the moof atom. Perhaps the field should be absent (controlled by the flag in the FullBox) instead or maybe just put a good pointer in there.
I will finish with some samples I have generated (and corrections and comments are welcome) :
new-style
old-style VLC syntax, but not supported by VLC?
The MPD syntax used by VLC is old. The latest DASH draft I have (ISO 23009-1 dated 2011-08-30) has changed a couple of tags and a lot of attributes.
Group becomes AdaptationSet
InitialisationSegmentURL becomes Initialisation
Url@sourceURL becomes SegmentURL@media
the MPD@xmlns and @profiles are different.
VLC also malfunctions (by failing to play audio) if the ISOFF segments are too long (10 seconds appears to be the limit). I suspect this is because access units pointed at by a trun atom have to be contiguous per-track, so it's "all video" followed by "all audio" and if the player can't fit the entire file into its buffer, it would have to issue two HTTP requests for different byte ranges to be able to stream both audio and video.
The client I was targeting actually requires separate audio and video segments (instead of the "multiplexed" segments used by VLC). One AdaptationSet has video and a second AdaptationSet has audio. This works around the need to use advanced HTTP techniques from 1999. Unfortunately, VLC does not appear to handle unmultiplexed audio and video. When I generated old-syntax MPD files with unmultiplexed segments and fed them to VLC it failed to play giving errors like "could not find corresponding trex".
Another oddness I noticed in the VLC DASH samples is the data_offset field in the trun box. In the first trun it is correct (e.g. 4076), but in the second it is 0. I think the spec says that a zero would point at the beginning of the moof atom. Perhaps the field should be absent (controlled by the flag in the FullBox) instead or maybe just put a good pointer in there.
I will finish with some samples I have generated (and corrections and comments are welcome) :
new-style
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011" profiles="urn:mpeg:dash:profile:full:2011" type="dynamic" availabilityStartTime="2012-01-27T12:00:27" minBufferTime="PT10.00S">
<Period>
<AdaptationSet id="465">
<Representation bandwidth="4000000" id="r1" codecs="avc1.4d400d" mimeType="video/mp4" startWithSAP="4">
<SegmentList>
<Initialisation sourceURL="v-init.mp4" />
<SegmentURL media="v-segment0001.m4s" />
<SegmentURL media="v-segment0002.m4s" />
<SegmentURL media="v-segment0003.m4s" />
<SegmentURL media="v-segment0004.m4s" />
<SegmentURL media="v-segment0005.m4s" />
<SegmentURL media="v-segment0006.m4s" />
<SegmentURL media="v-segment0007.m4s" />
<SegmentURL media="v-segment0008.m4s" />
<SegmentURL media="v-segment0009.m4s" />
<SegmentURL media="v-segment0010.m4s" />
<SegmentURL media="v-segment0011.m4s" />
<SegmentURL media="v-segment0012.m4s" />
<SegmentURL media="v-segment0013.m4s" />
<SegmentURL media="v-segment0014.m4s" />
<SegmentURL media="v-segment0015.m4s" />
<SegmentURL media="v-segment0016.m4s" />
<SegmentURL media="v-segment0017.m4s" />
<SegmentURL media="v-segment0018.m4s" />
<SegmentURL media="v-segment0019.m4s" />
<SegmentURL media="v-segment0020.m4s" />
<SegmentURL media="v-segment0021.m4s" />
<SegmentURL media="v-segment0022.m4s" />
<SegmentURL media="v-segment0023.m4s" />
<SegmentURL media="v-segment0024.m4s" />
<SegmentURL media="v-segment0025.m4s" />
<SegmentURL media="v-segment0026.m4s" />
<SegmentURL media="v-segment0027.m4s" />
<SegmentURL media="v-segment0028.m4s" />
<SegmentURL media="v-segment0029.m4s" />
<SegmentURL media="v-segment0030.m4s" />
<SegmentURL media="v-segment0031.m4s" />
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="483">
<Representation bandwidth="128000" id="r2" codecs="mp4a.40.2" mimeType="audio/mp4" startWithSAP="4">
<SegmentList>
<Initialisation sourceURL="a-init.mp4" />
<SegmentURL media="a-segment0001.m4s" />
<SegmentURL media="a-segment0002.m4s" />
<SegmentURL media="a-segment0003.m4s" />
<SegmentURL media="a-segment0004.m4s" />
<SegmentURL media="a-segment0005.m4s" />
<SegmentURL media="a-segment0006.m4s" />
<SegmentURL media="a-segment0007.m4s" />
<SegmentURL media="a-segment0008.m4s" />
<SegmentURL media="a-segment0009.m4s" />
<SegmentURL media="a-segment0010.m4s" />
<SegmentURL media="a-segment0011.m4s" />
<SegmentURL media="a-segment0012.m4s" />
<SegmentURL media="a-segment0013.m4s" />
<SegmentURL media="a-segment0014.m4s" />
<SegmentURL media="a-segment0015.m4s" />
<SegmentURL media="a-segment0016.m4s" />
<SegmentURL media="a-segment0017.m4s" />
<SegmentURL media="a-segment0018.m4s" />
<SegmentURL media="a-segment0019.m4s" />
<SegmentURL media="a-segment0020.m4s" />
<SegmentURL media="a-segment0021.m4s" />
<SegmentURL media="a-segment0022.m4s" />
<SegmentURL media="a-segment0023.m4s" />
<SegmentURL media="a-segment0024.m4s" />
<SegmentURL media="a-segment0025.m4s" />
<SegmentURL media="a-segment0026.m4s" />
<SegmentURL media="a-segment0027.m4s" />
<SegmentURL media="a-segment0028.m4s" />
<SegmentURL media="a-segment0029.m4s" />
<SegmentURL media="a-segment0030.m4s" />
<SegmentURL media="a-segment0031.m4s" />
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:mpegB:schema:DASH:MPD:DIS2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:mpegB:schema:DASH:MPD:DIS2011" profiles="urn:mpeg:mpegB:profile:dash:isoff-basic-on-demand:cm" type="OnDemand">
<Period>
<Group segmentAlignmentFlag="true" mimeType="video/mp4">
<Representation bandwidth="4000000" id="r1">
<SegmentInfo>
<InitialisationSegmentURL sourceURL="v-init.mp4" />
<Url sourceURL="v-segment0001.m4s" />
<Url sourceURL="v-segment0002.m4s" />
<Url sourceURL="v-segment0003.m4s" />
<Url sourceURL="v-segment0004.m4s" />
<Url sourceURL="v-segment0005.m4s" />
<Url sourceURL="v-segment0006.m4s" />
<Url sourceURL="v-segment0007.m4s" />
<Url sourceURL="v-segment0008.m4s" />
<Url sourceURL="v-segment0009.m4s" />
<Url sourceURL="v-segment0010.m4s" />
<Url sourceURL="v-segment0011.m4s" />
<Url sourceURL="v-segment0012.m4s" />
<Url sourceURL="v-segment0013.m4s" />
<Url sourceURL="v-segment0014.m4s" />
<Url sourceURL="v-segment0015.m4s" />
<Url sourceURL="v-segment0016.m4s" />
<Url sourceURL="v-segment0017.m4s" />
<Url sourceURL="v-segment0018.m4s" />
<Url sourceURL="v-segment0019.m4s" />
<Url sourceURL="v-segment0020.m4s" />
<Url sourceURL="v-segment0021.m4s" />
<Url sourceURL="v-segment0022.m4s" />
<Url sourceURL="v-segment0023.m4s" />
<Url sourceURL="v-segment0024.m4s" />
<Url sourceURL="v-segment0025.m4s" />
<Url sourceURL="v-segment0026.m4s" />
<Url sourceURL="v-segment0027.m4s" />
<Url sourceURL="v-segment0028.m4s" />
<Url sourceURL="v-segment0029.m4s" />
<Url sourceURL="v-segment0030.m4s" />
<Url sourceURL="v-segment0031.m4s" />
</SegmentInfo>
</Representation>
</Group>
<Group segmentAlignmentFlag="true" mimeType="audio/mp4">
<Representation bandwidth="128000" id="r2">
<SegmentInfo>
<InitialisationSegmentURL sourceURL="a-init.mp4" />
<Url sourceURL="a-segment0001.m4s" />
<Url sourceURL="a-segment0002.m4s" />
<Url sourceURL="a-segment0003.m4s" />
<Url sourceURL="a-segment0004.m4s" />
<Url sourceURL="a-segment0005.m4s" />
<Url sourceURL="a-segment0006.m4s" />
<Url sourceURL="a-segment0007.m4s" />
<Url sourceURL="a-segment0008.m4s" />
<Url sourceURL="a-segment0009.m4s" />
<Url sourceURL="a-segment0010.m4s" />
<Url sourceURL="a-segment0011.m4s" />
<Url sourceURL="a-segment0012.m4s" />
<Url sourceURL="a-segment0013.m4s" />
<Url sourceURL="a-segment0014.m4s" />
<Url sourceURL="a-segment0015.m4s" />
<Url sourceURL="a-segment0016.m4s" />
<Url sourceURL="a-segment0017.m4s" />
<Url sourceURL="a-segment0018.m4s" />
<Url sourceURL="a-segment0019.m4s" />
<Url sourceURL="a-segment0020.m4s" />
<Url sourceURL="a-segment0021.m4s" />
<Url sourceURL="a-segment0022.m4s" />
<Url sourceURL="a-segment0023.m4s" />
<Url sourceURL="a-segment0024.m4s" />
<Url sourceURL="a-segment0025.m4s" />
<Url sourceURL="a-segment0026.m4s" />
<Url sourceURL="a-segment0027.m4s" />
<Url sourceURL="a-segment0028.m4s" />
<Url sourceURL="a-segment0029.m4s" />
<Url sourceURL="a-segment0030.m4s" />
<Url sourceURL="a-segment0031.m4s" />
</SegmentInfo>
</Representation>
</Group>
</Period>
</MPD>