Skip to content
New issue

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

播放没问题,但是为什么保存下来的是 m3u8 文件? #190

Open
S4MUEL-404 opened this issue Feb 16, 2017 · 2 comments
Open

Comments

@S4MUEL-404
Copy link

S4MUEL-404 commented Feb 16, 2017

技术菜想求教,如何保存成视频啊?thx : )

@anpoz
Copy link

anpoz commented May 16, 2017

m3u8是一种索引文件,也就只是一个索引,要获取真正的地址,可能要打开它,然后将视频流地址进行拼接才行哟

@anpoz
Copy link

anpoz commented May 16, 2017

比如我得到熊猫直播的一个m3u8文件,原本的链接为
http://pl-hls3.live.panda.tv/live_panda/a60c08c3c87fe77d3541f2b91fe0b3d7_small.m3u8
打开之后的数据为
`#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:126

#EXTINF:1.968
a60c08c3c87fe77d3541f2b91fe0b3d7_small/85463.ts?wsApp=HLS&wsMonitor=-1
#EXTINF:3.962
a60c08c3c87fe77d3541f2b91fe0b3d7_small/85464.ts?wsApp=HLS&wsMonitor=-1
#EXTINF:1.959
a60c08c3c87fe77d3541f2b91fe0b3d7_small/85465.ts?wsApp=HLS&wsMonitor=-1
`

这时候就可以拼接成
http://pl-hls3.live.panda.tv/live_panda/a60c08c3c87fe77d3541f2b91fe0b3d7_small/85464.ts?wsApp=HLS&wsMonitor=-1
可以获得一个视频片段,但也只是一个片段而已,具体怎么样建议研究一个m3u8协议

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants