My Http Live Streaming setup: Apache hosts the html, m3u8, and ts files
The ts files are copied over from http:devimages.apple.com/iphone/samples/bipbop/gear1/fileSequence*.ts. There is nothing wrong with the video encoding (verified by actually playing these files)
m3u8 files (both the multi-bitrate and leaf-level) are copied over from apple's example and are syntactically correct, as follows:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10, no desc
fileSequence0.ts
...
#EXTINF:1, no desc
fileSequence180.ts
#EXT-X-ENDLIST
videoplay.html (below) fails to stream the video from my apache server
<video src="bipbop/bipbopall.m3u8" controls autoplay ></video>
However on modifying videoplay.html (below), the video streams just fine from Apple's website
<video src="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8" controls autoplay ></video>
I suspected something wrong with mime type settings because Chrome was handling http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 and http://localhost/bipbop/bipbopall.m3u8 differently. While Chrome tries to play the former, it downloads and saves the latter one. So I double checked my mime type setting, which is set as below in my httpd.conf
AddType application/x-mpegURL .m3u8
AddType video/MP2T .ts
- Is my mime type setting correct?
- How do we figure the mime type association advertised by apple's website?
- Or do we have to look elsewhere to fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…