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

前端 未结 1 845
感动是毒
感动是毒 2021-02-08 13:08

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

相关标签:
1条回答
  • 2021-02-08 13:36

    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.

    0 讨论(0)
提交回复
热议问题