HTML5视频元素对实时流媒体有什么支持? [英] What support for live streaming does the HTML5 video element have?

查看:1013
本文介绍了HTML5视频元素对实时流媒体有什么支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML5视频元素是否支持非基于HTTP(HLS,SmoothStreaming等)的直播协议?

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

是否支持RTP / RTSP流媒体协议?它是否支持RT M P?是否有支持或不支持它的特定浏览器?

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

推荐答案

HTML5标签对视频源的支持非常有限。支持的视频源也仅限于访问者使用的浏览器。请参阅:

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

表格支持的格式,具体取决于浏览器。总而言之,HTML5 Video支持所有浏览器上的MP4和FireFox,Opera和Chrome中的OGG,WEBM。话虽如此,它是技术上可以流式传输RTSP / RTP ,但非常不推荐。

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.

如果您必须使用HTML5视频并对流媒体服务器有更多控制权,可以尝试此解决方案,它解释了如何使用VLC通过ogg文件流式传输视频。然后,该ogg文件链接可用于在带有HTML5视频标记的页面上流式传输视频。

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.

HTML5视频标记的替代方法

Flash视频播放器比HTML5视频支持更多。例如, JW Player 支持:

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


  • 3种视频文件类型:MP4,WebM和FLV。

  • 3种音频文件类型:AAC,MP3和Vorbis 。

  • 2流协议:HLS和RTMP。

对于更高级的视频和音频源支持您可以尝试 VLC Web插件,或新的 WebChimera (基于libvlc)。 (这两个都需要安装一个插件,flash也需要一个插件,但通常已安装)

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)

更新

由于大多数浏览器都弃用了NPAPI插件,因此使用VLC Web插件和WebChimera NPAPI不​​再是解决方案。

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

另一个有趣的有关此主题的注意事项是 Dailymotion的HLS.js ,它可以为所有人提供直播浏览器通过HLS。

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.

这篇关于HTML5视频元素对实时流媒体有什么支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆