videojs / mpd-parser

https://videojs.github.io/mpd-parser/
Other
79 stars 54 forks source link

Live/dynamic and multi period documentation #78

Open patrickkunka opened 5 years ago

patrickkunka commented 5 years ago

Thanks for open sourcing this. I've managed to get a basic VOD player playing DASH content from mpd parser input. My next challenge will be live content and multi period content. Are these supported and how are these represented in your schema ?

It would be really helpful to have some basic documentation around your schema explaining how each property relates to DASH XML input.

Thanks

warren-bank commented 4 years ago

I have a related question..

Is there any attribute in the resulting data structure to distinguish <MPD type="static" from <MPD type="dynamic"?

examples:

I'm looking at the JSON that was generated for each, and I'm not seeing any way to determine that one is VOD and the other is not. In fact, both include a minimumUpdatePeriod attribute, which (please correct me if I'm wrong) I believe should not be present in a "static" manifest.

gesinger commented 4 years ago

Good idea on creating more documentation around that @patrickkunka . We will look into adding some. Right now, to determine if the result is live vs VOD, you'd have to check the endList value on a playlist, where a truthy value means VOD, and its nonexistence or falsy value means live. This is because we've based the parsed object off of the m3u8-parser and https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.4

warren-bank commented 4 years ago

I thought that attribute might be revealing, but for both of the manifests that I referenced (above).. the resulting data structures contain: "endList": true. Can you think of any reason that the "dynamic" dash manifest would also yield this value in the output?

gesinger commented 4 years ago

@warren-bank do you have a sample we can look at?

warren-bank commented 4 years ago

Just did a quick skim of the code.. and this implies that the attribute value might be hard coded?

warren-bank commented 4 years ago

I was using this dynamic manifest.. mainly because when I was looking for an example, I noticed that these samples use it.

warren-bank commented 4 years ago

Oh ok.. an endList attribute occurs at different levels in the JSON.. each stream has its own. So I just need to get the value from the video stream.. not the top-level value. Gotcha..

warren-bank commented 4 years ago

Off-topic question, but it's a quick one.. I'm curious about the name "toM3u8".. is there any functionality to generate HLS (m3u8) manifests (master and children) from a given DASH (mpd) input?

gkatsev commented 4 years ago

Our internal JSON representation is sort of based off of HLS, and so we convert the MPD to that same JSON representation. We don't currently have a project that takes that JSON representation and produces an HLS or DASH output.

warren-bank commented 4 years ago

Yes, that's what I thought. On the one hand, it would've been great if that functionality was included for free. On the other hand, I would've felt really dumb.. because the project in which I was using mpd-parser at the time was to do just that. (PS: seems to work nicely)