Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What support for live streaming does the HTML5 video element have?

Does the HTML5 video element support non-HTTP-based (HLS, SmoothStreaming, etc.) live-streaming protocols?

Does it support RTP/RTSP streaming protocols? Does it support RTMP? Are there specific browsers that support or don't support it?

like image 291
user3861866 Avatar asked Nov 29 '14 14:11

user3861866


People also ask

What is HTML5 video streaming?

With HTML5 video streaming, the website hosting the content uses native HTTP to stream the media to viewers directly. Content tags (e.g., <video> tag) are part of the HTML code. Thus, using the <video> tag creates a native HTML5 video player within your browser.

Does HTML5 support RTMP?

HTML5 video players utilize the HLS streaming protocol and cannot be used with RTMP.

What video format does HTML5 video element support?

The HTML5 video format capabilities include three options to play: MP4, WebM, and Ogg.

How do I live stream using HTML?

Live streaming in HTML5 is possible via the use of Media Source Extensions (MSE) - the relatively new W3C standard: https://www.w3.org/TR/media-source/ MSE is an an extension of HTML5 <video> tag; the javascript on webpage can fetch audio/video segments from the server and push them to MSE for playback.


1 Answers

HTML5 tag has very limited support on video sources. The video sources supported are also limited to what browser your visitors use. Please see:

http://www.w3schools.com/html/html5_video.asp

for a table of supported formats depending on browser. To sum it up, HTML5 Video supports MP4 on all browsers and OGG, WEBM in FireFox, Opera and Chrome. With that said, it is Technically Possible to stream RTSP/RTP, but highly unrecommended.

If you must use HTML5 Video and have more control over the streaming server, you could try This Solution, which explains how to stream a video through an ogg file with VLC. Then that ogg file link can be used to stream the video on a page with HTML5 Video Tag.

Alternatives to HTML5 Video tag

Flash Video Players support quite a bit more then HTML5 Video. For example JW Player supports:

  • 3 video file types: MP4, WebM and FLV.
  • 3 audio file types: AAC, MP3 and Vorbis.
  • 2 streaming protocols: HLS and RTMP.

And for even more advanced video and audio source support you could try VLC Web Plugin, or the new WebChimera (based on libvlc). (both of these require a plugin installed, flash requires a plugin too, but that is usually already installed)

UPDATE

As NPAPI plugins have been deprecated in most browsers, using VLC Web Plugin and WebChimera NPAPI is no longer a solution.

Another interesting thing to note on this topic is Dailymotion's HLS.js that gives the possibility of live streaming to all browsers through HLS.

like image 82
Jaruba Avatar answered Oct 18 '22 03:10

Jaruba