Can HTML5 Play a .mpd Manifest File Through Its Video Tag?
Asked Answered
D

1

14

I have a Movie_Manifest.mpd file that is made up of 5 .webm video streams (consisting of different sizes and bps) and 1 audio file. The question I'm asking is: can it be played through a "simple" HTML5 video tag?

I've tried this and it doesn't work:

<video controls>
  <source src = "Movie_Manifest.mpd"/>
</video>

Well it works, but it chooses the lowest quality video stream and the output is laggy. I would like it to have adaptive bit streaming. You might think, "Do you think your bandwidth is just that slow?" Yeah, my bandwidth is slow, but not that slow. And besides, when I run that low quality webm file on its own, it runs smooth.

So to reiterate:

1) Can I use a "simple" HTML5 video tag for adaptive bit streaming?

Or

2) Do I have to use an open source media player (that the video tag would be accessing through a javascript)?

Thanks and happy streaming

Daisy answered 26/4, 2017 at 11:27 Comment(1)
HTML5 for dash / .mpd github.com/Dash-Industry-Forum/dash.js Demo here: reference.dashif.org/dash.js/nightly/samples/…Mccomb
C
13

Can HTML5 Play a .mpd Manifest File Through Its Video Tag?

No, the browser would have to support DASH directly and no browser currently does.

Can I use a "simple" HTML5 video tag for adaptive bit streaming?

No, browsers do not natively support protocols used for adaptive bitrate. There is some HLS support out there, but it's far from universal.

Do I have to use an open source media player (that the video tag would be accessing through a javascript)?

Whether the player code is open source or not is irrelevant.

Basically, what you need to play DASH or other segmented HTTP-based media protocols is some JavaScript that utilizes Media Source Extensions. https://www.w3.org/TR/media-source/

Media Source Extensions (MSE) is a relatively new standard where you write JavaScript that delivers media chunks to the browser. You don't have to decode this media in-script, you just need to deliver it. This allows for custom distribution protocols on top of anything you can already use in JavaScript (HTTP(S), WebSocket, and WebRTC data channels).

To play DASH in-browser, the usual way is to use DASH.js. https://github.com/Dash-Industry-Forum/dash.js/wiki It's effectively the reference player for DASH, and is extremely well tested.

You could develop your own player if you wanted. MSE isn't too difficult to interface with. It's doable if you have some special reason to want to use your own distribution method.

Confiscate answered 27/4, 2017 at 2:9 Comment(6)
Javascript is open source: "Basically, what you need... is some JavaScript"Dipstick
@Dipstick Don't confuse the license of the software with your ability to deobfuscate it.Confiscate
Open source is not a license. Open source means the source is available. You're thinking of free (as in Libre) or copy-lefted software. Open means as it sounds: open, available. Free means "you can do whatever you want with it", as in freedom.Dipstick
@Dipstick Yes, obviously, but if you read the question you can understand what the person asking was getting at.Confiscate
Yes, the OP was getting at the fact that ALL javascript is open source; because javascript is source code. It's a very important distinction. ALL software should be open source (it's a question of security, reliability, and auditability); copy-left on the other hand, is a moral choice.Dipstick
If, on the other hand, you mean that they could use a closed-source plugin to play video as well, you are of course correct, but it's a poor recommendation.Dipstick

© 2022 - 2024 — McMap. All rights reserved.