Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a JSON manifest format for DASH mpds #393

Open
wilaw opened this issue Dec 10, 2019 · 7 comments
Open

Create a JSON manifest format for DASH mpds #393

wilaw opened this issue Dec 10, 2019 · 7 comments

Comments

@wilaw
Copy link
Member

wilaw commented Dec 10, 2019

Everyone complains about the inefficiency of processing xml in the modern OTT world, especially in Javascript-based environments in which parsers are not natively supported. A far more common, lightweight and popular data structure is JSON (JavaScript Object Notation) https://www.json.org/json-en.html

Can the DASH-IF create a JSON-based manifest structure?

  1. The file extension will be .mpj (or .mpdj) to differentiate it from existing xml-based mpds.
  2. It has a 1:1 correspondence in terms of information conveyed with the XML variant

We can define this and contribute it to MPEG for ratification. We claim the IP for this and commit to being license/royalty free for its use.

Cheers
Will

@vladimir-kazakov
Copy link

Is there a good reason to use custom file extensions? Using the standard .xml and .json better describes the type of the content, and may simplify configuration of web servers, since some of them support these extensions by default.

@sandersaares
Copy link
Member

Wouldn't this result in players having to implement two formats, leading to decreased interoperability? This makes me hesitate. I feel more gains can be made from work to optimize for small manifest size, as opposed to a different format. However, I am happy to be convinced otherwise by data.

@jpiesing
Copy link

jpiesing commented Dec 16, 2019

Is there any evidence that XML really is inefficient to process or is this just used as an excuse for people's technical preferences or design choices?
Even if there is some inefficiency, is this significant given the overall picture of a DASH client or are there other bigger gains that could be made at less cost / risk?

@tafinho
Copy link

tafinho commented Dec 16, 2019

There are no native XML parsers on ECMAScript.
There's no such need to JSON. Data model matches the code. This is critical for pure HTML based approaches.

@jpiesing
Copy link

There are no native XML parsers on ECMAScript.
There's no such need to JSON. Data model matches the code.

Is the inefficiency introduced by using a JavaScript XML parser library significant given everything else involved in playing DASH content?

This is critical for pure HTML based approaches.

Please can you give an example of what you mean by "pure HTML based approach"?

@tafinho
Copy link

tafinho commented Dec 16, 2019

Let me give you an example that covers both cases:

Javascript was historically a single threaded process. DASH processing is inherently a multi threaded process: you need to refetch and reprocess while at the same time fetch, process and feed segments into the video decoder.

Nowadays, this is always done in tandem, you do all of them in sequence, at least the processing part (fetching can be done in the background).
As DOMParser relies on the sole existence of a DOM tree, it prevents it to be used on the process ECMA designed to allow multithreading to take place: service workers.

What are the consequence ?

  • Slower application performance
  • Higher application latency
  • Multi Core devices cannot have significant difficulty on coping with high bitrate / low latency, as one single core needs to handle all js, including for instance dashJS.

This is becoming more and mode a problem, the more 8+ core CPUs are present on low power / high performance devices.

@sandersaares
Copy link
Member

Here's a DOMless XML parser: https://www.npmjs.com/package/fast-xml-parser

How does the performance of this compare to JSON loading? Can you use this from service workers? If a DASH player used it to refresh a nontrivial MPD once per second, what would be the cost in terms of processing power and battery, as a % of the total player budget?

I do not have the tools to provide good data here but maybe someone else can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants