Ijkplayer: 本地m3u8文件播放失败

Created on 3 Jun 2016  ·  13Comments  ·  Source: bilibili/ijkplayer

你好,我这边播放本地保存的m3u8,使用default脚本编译ffmpeg,仍然返回如下错误
[file @ 0x7ff462db4d10] Setting default whitelist 'file'
[hls,applehttp @ 0x7ff46305e000] Format hls,applehttp probed with size=2048 and score=100
[hls,applehttp @ 0x7ff46305e000] HLS request for url 'http://milai.oss-cn-hangzhou.aliyuncs.com/v/ay1463377430414oTYeF/1234567890/2016/04/29/10/08/20/v.ts?Expires=1464947505&OSSAccessKeyId=Iu1sbno1XIf0jhYC&Signature=v%2Bx7adzP9GC8woBzicjAV0Pfd%2BU%3D', offset 0, playlist 0
[http @ 0x7ff462f64ad0] Protocol not on whitelist 'file'!

这个问题有遇到过吗?怎么解决?file选项已经编译进ffmpeg

Most helpful comment

ffmpeg -protocol_whitelist "concat,file,subfile,http,https,tls,rtp,tcp,udp,crypto" -i test.m3u8
这样不会报那个错误了 但是貌似还是加载对应文件失败。。。

All 13 comments

用vlc播放的时候是可以的,用一个第三方的ffplay工程也可以

ffmpeg3.0因为安全问题,貌似禁掉了本地m3u8的播放,这个怎么处理?

有什么方法可以播放m3u8本地文件?bilibili大神

怎么修改whitelist,我看到说明文档里面:"Add protocol_whitelist to AVFormatContext, AVIOContext",但我仔细找了找,修改了file.c里的default_whitelist,还把http.c里的default_whitelist都添加了file,都还是没什么作用,求大神帮助。

同问

set format option "protocol_whitelist"

mediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT,"protocol_whitelist","file");这样设置也不行呀

ffmpeg -protocol_whitelist "concat,file,subfile,http,https,tls,rtp,tcp,udp,crypto" -i test.m3u8
这样不会报那个错误了 但是貌似还是加载对应文件失败。。。

修改源码中的白名单可以取本地m3u8

如何修改源码中的白名单

[options setFormatOptionValue:@"file,udp,rtp"                  forKey:@"protocol_whitelist"];
Was this page helpful?
0 / 5 - 0 ratings