我正在尝试 HTTP 直播。当我验证我的主播放列表时,它给了我上述错误
我首先用
分割了我的视频sudo /usr/bin/mediafilesegmenter -I -f Desktop/MyVideo Desktop/MyVideo.mp4
仅使用分段音频
sudo /usr/bin/mediafilesegmenter -I -f Desktop/MyAudio -a Desktop/MyVideo.mp4
之后,我使用 variantplaylistcreator
创建了主播放列表,我的最终链接是 http://www.example.com/Apple/final.m3u8
,其中包含视频n 音频只有两个流。
当我验证此链接时
mediastreamvalidator validate http://www.example.com/Apple/final.m3u8
它给了我这个结果
Playlist Validation:
Error: (-12646:0) Illegal MIME type: text/plain
Segments:
OK
我该如何解决这个错误??有什么帮助吗?
提前谢谢你..!!
最佳答案
您需要修改您的网络服务器配置,以便它提供具有正确 mime 类型的 m3u8 文件。根据this list of playlist formats , m3u 播放列表(m3u8 是 m3u 的 UTF-8 变体)应该具有以下 mime 类型之一:
Mime type:
audio/mpegurl (recommended)
audio/x-mpegurl
在this technical note Apple 说应该使用 application/x-mpegurl
所以我认为这是你最好的选择:
假设您正在使用 Apache(很有可能)these instructions should help you configure the server correctly .
关于iphone - 如何修复 "Error: (-12646:0) Illegal MIME type: text/plain",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8516048/