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

无法播放伪装成png的ts片段的问题 #37

Open
Miku-frank opened this issue Oct 12, 2022 · 1 comment
Open

无法播放伪装成png的ts片段的问题 #37

Miku-frank opened this issue Oct 12, 2022 · 1 comment

Comments

@Miku-frank
Copy link

请问一下播放器用的是dplayer吗,爬取某个网站视频m3u8返回数据里的片段被伪装png导致播放失败怎么解决的

@zaxtyson
Copy link
Owner

zaxtyson commented Dec 4, 2022

非常抱歉这么晚才回复,因为这段时间事情挺多,这个项目重构也一直托着🤧。

解决的方法是:先用binwalk等工具从图片中检测出ts视频片段的起始位置,通常来说是一个1x1的小图片作为header,后面append上视频数据,只要把前面的数据去掉即可。我是通过代理的方式实现的,dplayer 请求m3u8文件,我返回一个修改过后的m3u8文件给dplayer。这个新m3u8中所有的fragment url 都会改成本地的代理url,dplayer请求某一个视频片段时,请求的也是本地代理,代理服务去请求原始的视频片段,然后去掉这个header在返回给dpalyer。

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