Search code examples
iphoneiosxcode4mime-typeshttp-live-streaming

How to fix "Error: (-12646:0) Illegal MIME type: text/plain"


I am trying for HTTP Live Streaming. When i validating my master playlist , it gives me above error

I have segmented my video firstly with

sudo /usr/bin/mediafilesegmenter -I -f Desktop/MyVideo Desktop/MyVideo.mp4

Segmented Audio only with

sudo /usr/bin/mediafilesegmenter -I -f Desktop/MyAudio -a Desktop/MyVideo.mp4

After that i have created master playlist by using variantplaylistcreator and my final link is http://www.example.com/Apple/final.m3u8which contain video n audio only both stream.

When i validate this link with

mediastreamvalidator validate http://www.example.com/Apple/final.m3u8

It gave me this out put

Playlist Validation: 

Error: (-12646:0) Illegal MIME type: text/plain

Segments:

    OK

How do i fix this error?? Any help?

Thank you in advance..!!


Solution

  • You need to modify your web server configuration such that it serves up the m3u8 file with the correct mime-type. According to this list of playlist formats, an m3u playlist (m3u8 is a UTF-8 variation of m3u) should have one of the following mime types:

    Mime type:

    audio/mpegurl (recommended)

    audio/x-mpegurl

    In this technical note Apple say that application/x-mpegurl should be used so I think that's your best bet:

    Screenshot of Apple Technical Note

    Assuming you're using Apache (quite likely) these instructions should help you configure the server correctly.