Http Live Streaming not working on Apache

后端 未结 3 1640
不知归路
不知归路 2020-12-06 04:00

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/bi

相关标签:
3条回答
  • 2020-12-06 04:18

    Bit late, but for clarity's sake:

    File extension |                 MIME type
    -------------------------------------------------------------
    .M3U8          | application/x-mpegURL (or vnd.apple.mpegURL)
    .ts            | video/MP2T
    

    Source: Apple Developer Streaming Media Guide – HTTP Streaming Architecture

    0 讨论(0)
  • 2020-12-06 04:20

    According to the HLS rfc documentation you should use "application/vnd.apple.mpegurl" or "audio/mpegurl" but you could also simply make the path end with .m3u8 or .m3u.

    Each Playlist file MUST be identifiable either by the path component of its URI or by HTTP Content-Type. In the first case, the path MUST end with either .m3u8 or .m3u. In the second, the HTTP Content-Type MUST be "application/vnd.apple.mpegurl" or "audio/mpegurl". Clients SHOULD refuse to parse Playlists that are not so identified.

    ~ Chapter 4 of rfc8216, HTTP Live Streaming

    0 讨论(0)
  • 2020-12-06 04:29

    This might seem strange but I also faced similar problems, and after much debugging I found that empty lines in the .m3u8 index file can cause such issues. Please double check for empty lines in your index file.

    0 讨论(0)
提交回复
热议问题