We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
附件: playlist.m3u8.zip
格式内容:
#EXTM3U #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio/stereo/en/128kbit.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo",LANGUAGE="dubbing",NAME="Dubbing",DEFAULT=NO,AUTOSELECT=YES,URI="audio/stereo/none/128kbit.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="surround",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio/surround/en/320kbit.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="surround",LANGUAGE="dubbing",NAME="Dubbing",DEFAULT=NO,AUTOSELECT=YES,URI="audio/stereo/none/128kbit.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Deutsch",DEFAULT=NO,AUTOSELECT=YES,FORCED=NO,LANGUAGE="de",URI="subtitles_de.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="en",URI="subtitles_en.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Espanol",DEFAULT=NO,AUTOSELECT=YES,FORCED=NO,LANGUAGE="es",URI="subtitles_es.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Français",DEFAULT=NO,AUTOSELECT=YES,FORCED=NO,LANGUAGE="fr",URI="subtitles_fr.m3u8" #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=258157,CODECS="avc1.4d400d,mp4a.40.2",AUDIO="stereo",RESOLUTION=422x180,SUBTITLES="subs" video/250kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=520929,CODECS="avc1.4d4015,mp4a.40.2",AUDIO="stereo",RESOLUTION=638x272,SUBTITLES="subs" video/500kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=831270,CODECS="avc1.4d4015,mp4a.40.2",AUDIO="stereo",RESOLUTION=638x272,SUBTITLES="subs" video/800kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1144430,CODECS="avc1.4d401f,mp4a.40.2",AUDIO="surround",RESOLUTION=958x408,SUBTITLES="subs" video/1100kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1558322,CODECS="avc1.4d401f,mp4a.40.2",AUDIO="surround",RESOLUTION=1277x554,SUBTITLES="subs" video/1500kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4149264,CODECS="avc1.4d4028,mp4a.40.2",AUDIO="surround",RESOLUTION=1921x818,SUBTITLES="subs" video/4000kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=6214307,CODECS="avc1.4d4028,mp4a.40.2",AUDIO="surround",RESOLUTION=1921x818,SUBTITLES="subs" video/6000kbit.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=10285391,CODECS="avc1.4d4033,mp4a.40.2",AUDIO="surround",RESOLUTION=4096x1744,SUBTITLES="subs" video/10000kbit.m3u8
The text was updated successfully, but these errors were encountered:
显然,你的文件中包含了不同比特率视频的m3u8文件的位置。选择一个合适的替换原链接中的playlist.m3u8即可,比如: https://bitdash-a.akamaihd.net/content/sintel/hls/video/250kbit.m3u8
Sorry, something went wrong.
多谢反馈,多谢帮忙解答
这段代码改成这样就能下载了 this.tsUrlList = [] this.finishList = [] var rtn=false; var start=false; // 提取 ts 视频片段地址 m3u8Str.split('\n').some((item) => { if (item.toLowerCase().indexOf('.ts') > -1) { this.tsUrlList.push(this.applyURL(item, this.url)) this.finishList.push({ title: item, status: '' }) }else if(item.toUpperCase().indexOf('#EXT-X-STREAM-INF') > -1){//找到真实地址开始的标识 start=true; }else if(start&&item.toLowerCase().indexOf('.m3u8') > -1){//找到真实地址 var keyUrl=item; if(keyUrl.startsWith('http')){ this.url=keyUrl; }else{ if(keyUrl.startsWith('/')){ keyUrl=keyUrl.substring(1); } keyUrl=this.url.substring(0,this.url.lastIndexOf("/")+1)+keyUrl; this.url=keyUrl; } console.log("keyUrl:"+keyUrl); rtn=true; this.getM3U8(); return true; } }) if(rtn){ return; }
No branches or pull requests
附件:
playlist.m3u8.zip
格式内容:
The text was updated successfully, but these errors were encountered: