Closed Murmur closed 6 months ago
This is a limitation in the underlying MPD library (https://github.com/Eyevinn/dash-mpd) that goes back to that the Go standard library xml parser does not handle name spaces well. That library has a modified xml library to handle name-spaces better, but they need to be added explicitly.
Livesim1 used a SAX parser (stream parser) and did modifications to the stream without interpreting it. Livesim2 is different in that it uses a mapping to structs derived from the XML schema at https://github.com/MPEGGroup/DASHSchema/blob/5th-Ed-AMD1/DASH-MPD.xsd so all elements that are not in the structs will be dropped.
This is a bit limiting, but also the reason that I started from the XML schema to try to make everything correct and compliant.
Please file a bug towards the MPD library and include an example with the name spaces that you think should be added.
Regarding the output order of the elements, it cannot follow the input, but is defined by the structs, which are in turn base on the order of elements defined by the XML schema alluded to above. There is typically a sequence which implies a strict order. The only uncertain thing is whether the explicit AdaptationSet children should come before or after the sequence of elements from the RepresentationBaseType. They are before right now, but maybe it is more correct to put them at the end. I haven't seen a validator complain yet, in any case.
Ok I created a ticket in dash-mpd
project. "Poor mans post-process solution" would be a brute force string manipulation before Livesim2 returned a manifest payload.
>>The only uncertain thing is whether the explicit AdaptationSet children should come before or after the sequence of elements from the RepresentationBaseType.
Yes this part worries me a bit as most other dash content is not using an ordering how Livesim2 writes <AdaptationSet>
child elements.
XML namespaces are dropped from the MPD element, some of them needed for DRM elements.
xmlns:cenc="urn:mpeg:cenc:2013" | xmlns:ck="http://dashif.org/guidelines/clearKey" | xmlns:dashif="https://dashif.org/" | xmlns:mas="urn:marlin:mas:1-0:services:schemas:mpd" | xmlns:mspr="urn:microsoft:playready" | xmlns:xlink="http://www.w3.org/1999/xlink"
Original vod manifest
See livesim2 example response here https://refapp.hbbtv.org/livesim2/tsbd_240/mup_4/spd_8/utc_keep/00_llama_h264_v9/cenc/manifest_prwvcenc_1080p.mpd
Livesim2 writes
xmlns:cenc
incenc <contentprotection>
but it also may be needed inside the Widevine+Playready drm element as well. It would be best to share namespace attributes inMPD parent element
and not drop any unknown to a livesim2. Older Livesim1 did not drop an additional namespace attributes.Livesim2 also touches the ordering of
<AdaptationSet>
child elements, DRM elements go to the end of list.