如何使用html5视频标签播放Apple HLS直播视频流 [英] How can I play Apple HLS live stream using html5 video tag

查看:575
本文介绍了如何使用html5视频标签播放Apple HLS直播视频流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < video id =liveautoplay controls> 
< source src =http:// [WOWZA-IP]:1935 / Live / mp4:[LIVESTREAMNAME] /playlist.m3u8type =video / mp4/>
< / video>

我试图使用html5视频标签播放h264编码的直播视频流。实时流由wowza媒体服务器播放,当访问src链接时,我会得到一个有效的播放列表文件。当试图在android chrome浏览器上播放流时,播放器什么也不做,并显示黑屏。



这是html5视频标签相关问题还是广播者?

解决方案

这些是您可以使用html5源代码标签播放的格式。 视频格式作为包含编码视频流和音频流的zip文件。您需要关心的三种网页格式是(webm,mp4和ogv):

  .mp4 = H.264 + AAC 
.ogg / .ogv = Theora + Vorbis
.webm = VP8 + Vorbis


<video id="live"  autoplay controls>
    <source src="http://[WOWZA-IP]:1935/Live/mp4:[LIVESTREAMNAME]/playlist.m3u8" type="video/mp4" />
</video>

I am trying to play h264 encoded live stream using html5 video tag. Live stream is broadcasted by wowza media server and when visiting src link I get a valid playlist file. When trying to play the stream on android chrome browser, player does nothing and shows black screen.

Is this html5 video tag related issue or maybe broadcaster?

解决方案

These are the formats you can play using html5 source tags.

Think of a video format as a zip file which contains the encoded video stream and audio stream. The three formats you should care about for the web are (webm, mp4 and ogv):

.mp4 = H.264 + AAC
.ogg/.ogv = Theora + Vorbis
.webm = VP8 + Vorbis

这篇关于如何使用html5视频标签播放Apple HLS直播视频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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