mc2soft / mpd Goto Github PK
View Code? Open in Web Editor NEWGo library for parsing and generating MPEG-DASH Media Presentation Description (MPD) files
License: MIT License
Go library for parsing and generating MPEG-DASH Media Presentation Description (MPD) files
License: MIT License
There are a few values that can be added for completeness.
<AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" bitstreamSwitching="false" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<SegmentTemplate timescale="90000" duration="180180" startNumber="1"/>
Duration. *string `xml:"duration,attr"`
<SegmentTemplate timescale="44100" media="aac_$Number%09d$.mp4" initialization="aacinit.mp4" duration="88288" startNumber="1"/>
AudioChannelConfiguration *AudioChannelConfiguration `xml:"AudioChannelConfiguration,omitempty"`
type AudioChannelConfiguration struct {
SchemeIDURI *string `xml:"schemeIdUri,attr"`
Value *string `xml:"value,attr,omitempty"`
}
<Representation id="6" bandwidth="192000" audioSamplingRate="48000" codecs="ec-3">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="6"/>
</Representation>
The library seems to assume that the DASH file would only have one Period
section, whereas it can have multiple, numbered periods.
This looks like a nice library for manipulating DASH MPDs.
I'm considering using this library for a project similar to https://github.com/dash-Industry-Forum/dash-live-source-simulator in Go, but there are very many MPD nodes and attributes missing before I can use it.
I can make some PRs for the elements I'm missing, but would like to know to understand if you have a strong opinion on how to add optional attributes.
For example, I would like to add contentType
to AdaptationSet, and I could either do it as
ContentType string `xml:"contentType,attr,omitempty"`
or
ContentType *string `xml:"contentType,attr"`
In my view, the first approach should be more efficient since it avoids one level of pointers, and it is also more clear
(at least to me) that this is an optional attribute. However, I get the impression that you use the pointers like *string
to signal that something is optional.
What is your recommendation?
Please contact me immediately
Based on timeline can can you give example to sync segment to wall clock time video and audio both. Dynamic and
There are many elements in the MPD which have DescriptorType such as Role, Reporting, Scope etc.
A DescriptorType element have three members
@schemeIdUri mandatory
@value optional
@id optional
but is somewhat more complex according to the xsd (ISO/IEC 23009-1 Section 5.8.3).
<!-- Descriptor -->
<xs:complexType name="DescriptorType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="schemeIdUri" type="xs:anyURI" use="required"/> <xs:attribute name="value" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:anyAttribute namespace="##other" processContents="lax"/>
Licensed to: Einarsson, Torbjörn Mr
Downloaded: 2019-09-18
114
Single user licence only, copying and networking prohibited
ISOIE 2019 All rights reserved
</xs:complexType>
However, the code currently defines Descriptor to be a DRM-specific descriptor with Cenc and ppsh entries.
It would be good to rename that to DrmDescriptor or something similar and have a generic Descriptor type that
can be used for other values in the DRM.
If interested let me know willing to compensate
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.