Client opens a TCP connection to a server as soon as enough data is available on the client, the client could eventually start with the decoding and rendering respectively.
Talk is cheap. Show me the code.
m := mpd.NewMPD(mpd.DASH_PROFILE_LIVE, "PT1M6.2S", "PT25.8S")
videoAS, _ := m.AddNewAdaptationSetVideo(
mpd.DASH_MIME_TYPE_VIDEO_MP4,
"progressive",
true, 1)
videoAS.SetNewSegmentTemplate(
107520,
"/cdn/$RepresentationID$/init-stream0.m4s",
"/cdn/$RepresentationID$/chunk-stream0-$Number%05d$.m4s",
1, 12800)
<MPD
xmlns="urn:mpeg:dash:schema:mpd:2011"
profiles="urn:mpeg:dash:profile:isoff-live:2011"
type="static"
mediaPresentationDuration="PT1M6.2S"
minBufferTime="PT25.8S"
>
<Period>
<AdaptationSet
mimeType="video/mp4"
startWithSAP="1"
scanType="progressive"
segmentAlignment="true"
>
<SegmentTemplate
duration="107520"
initialization="/cdn/$RepresentationID$/init-stream0.m4s"
media="/cdn/$RepresentationID$/chunk-stream0-$Number%05d$.m4s"
startNumber="1" timescale="12800"
>
</SegmentTemplate>
<Representation bandwidth="36704687"
codecs="avc1.64001e"
frameRate="25/1"
height="480" id="800k" width="640"
>
</Representation>
</AdaptationSet>
</Period>
</MPD>