Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I play Apple HLS live stream using html5 video tag

<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?

like image 546
jM2.me Avatar asked Aug 25 '13 23:08

jM2.me


People also ask

Does HTML5 video tag support HLS?

The HTML5 <video> tag by itself along with certain built-in video players do not work with HLS or MPEG-DASH adaptive bitrate-streaming formats.

Does video tag support HLS?

Microsoft Edge and Android browsers also support HLS natively in a video tag, but this leaves out several other viewers. Cutting out such a large group of viewers isn't sustainable for a site owner, so it's necessary for them to convert a stream into another file format and use it instead for other viewers.


1 Answers

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 
like image 181
robert Avatar answered Sep 23 '22 23:09

robert