16

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?

TylerH
  • 20,799
  • 66
  • 75
  • 101
user3861866
  • 310
  • 1
  • 3
  • 12
  • Possible duplicate of [HTML5 live streaming](http://stackoverflow.com/questions/5858936/html5-live-streaming) RTSP support: http://stackoverflow.com/questions/1735933/streaming-via-rtsp-or-rtp-in-html5 – Ciro Santilli OurBigBook.com Feb 20 '16 at 10:35

1 Answers1

4

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.

Community
  • 1
  • 1
Jaruba
  • 1,055
  • 11
  • 22
  • 7
    Niether MP4/WebM/FLV/HLS are streaming protocols, these are http pseudo streaming protocols, thus, chunked files are iteratively downloaded and played by the player, the inherent limitation of this kind of streaming is latency, The advantage of RTP/RTSP is minimal latency ( real streaming protocols )..., Having that said, can WebRTC be used for RTP(UDP) streaming ? Any working sample ? – user3861866 Dec 01 '14 at 09:31
  • 1
    I am not to familiar with WebRTC, from what I can gather it does support RTP. (although what you wish to do does not seem to be the intended use for WebRTC) I found [this answer](http://stackoverflow.com/a/16732579/2769366) which seems to be the closest to your needs. Other links that might be useful to your endeavour are [this link](http://stackoverflow.com/a/13581983/2769366) and [this link](https://www.webrtc-experiment.com/docs/RTP-usage.html) – Jaruba Dec 01 '14 at 11:24
  • 1
    What are you trying to stream? If your trying to stream an IP Cam with WebRTC, [this link](http://www.codeproject.com/Articles/800910/Broadcasting-of-a-Video-Stream-from-an-IP-camera-U) might be of help – Jaruba Dec 01 '14 at 13:46
  • @Jaruba Please don't like to w3schools.com, they are a private company that is no way affiliated with W3C. – Brendan Martin Jan 08 '16 at 13:13
  • Highly unlikely that it's highly recommended not to use Rtsp, you mean that it's unlikely the browser supports rtsp transport natively which is more accurate if you ignore Http tunneling of Rtsp. – Jay Jun 12 '16 at 15:12
  • @Jay If you give me a link to an article that coherently describes the practice of HTTP tunneling of RTSP, I'll update my answer accordingly. – Jaruba Jun 13 '16 at 06:20
  • @Jaruba, http://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp It could use more on tunneling indeed but the RFC is dually lacking. – Jay Jun 13 '16 at 11:53
  • Here is Apples Guide on tullening .. http://opensource.apple.com//source/QuickTimeStreamingServer/QuickTimeStreamingServer-412.42/Documentation/RTSP_Over_HTTP.pdf not very much helpful either, the Rtp and Rtcp Data may or may not be base64 encoded and if interleaved SETUP is used then there are 4 additional bytes which may or may not also be base64 encoded (depending on the implementation of Rtsp doing the tunneling) – Jay Jun 13 '16 at 15:22