From 0c5653eedae999646dfa3e125cd7126021d927f9 Mon Sep 17 00:00:00 2001 From: Markus Pfau Date: Mon, 27 Feb 2017 09:56:59 +0100 Subject: [PATCH] Set MPD::mediaPresentationDuration --- resources/lib/MSL.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/lib/MSL.py b/resources/lib/MSL.py index 92f8d9e..7210c71 100644 --- a/resources/lib/MSL.py +++ b/resources/lib/MSL.py @@ -207,15 +207,13 @@ class MSL: if len(manifest['psshb64']) >= 1: pssh = manifest['psshb64'][0] - + seconds = manifest['runtime']/1000 + duration = "PT"+str(seconds)+".00S" root = ET.Element('MPD') root.attrib['xmlns'] = 'urn:mpeg:dash:schema:mpd:2011' root.attrib['xmlns:cenc'] = 'urn:mpeg:cenc:2013' - - - seconds = manifest['runtime']/1000 - duration = "PT"+str(seconds)+".00S" + root.attrib['mediaPresentationDuration'] = duration period = ET.SubElement(root, 'Period', start='PT0S', duration=duration) -- 2.30.2