Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 731
alexs973 Avatar asked Apr 26 '17 11:04

alexs973


People also ask

How do I play a .MPD file?

Simply enter the URL of your mpeg-dash stream (. mpd file) into Castr's Dash player and press play. If everything goes well, the video will playback smoothly. Make sure your URL are HTTPS- compatible, otherwise your stream may not play.

What formats does video tag support?

The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element. There are three supported video formats in HTML: MP4, WebM, and OGG.

How does HTML5 video player work?

How it Works. HTML5 video works by allowing the person uploading the video to embed it directly into a web page. It works in a variety of internet browsers, including Internet Explorer 9+, Firefox, Opera, Chrome and Safari. Unfortunately, the technology is not compatible with Internet Explorer 8 and earlier versions.


1 Answers

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.

like image 166
Brad Avatar answered Sep 20 '22 14:09

Brad