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的解密key处理问题 #69

Open
mgxlili opened this issue Dec 5, 2023 · 0 comments
Open

关于 m3u8的解密key处理问题 #69

mgxlili opened this issue Dec 5, 2023 · 0 comments

Comments

@mgxlili
Copy link

mgxlili commented Dec 5, 2023

问题:
下载的m3u8有解密key,因为key是二进制。但是在判断时候还算直接保存为本地文件,看源码判断是乱码保存key 的url地址。
源码处:
判断key乱码
....
M3U8Utils.java

boolean isMessyStr = VideoDownloadUtils.isMessyCode(textBuilder.toString());
....
保存key内容
....
M3U8VideoDownloadTask.java
File keyFile = new File(mSaveDir, m3u8Ts.getLocalKeyUri());
if (!m3u8Ts.isMessyKey() && keyFile.exists()) {
key += ",URI="" + keyFile.getAbsolutePath() + """;
} else {
key += ",URI="" + m3u8Ts.getKeyUri() + """;
}
....

本地local.m3u8 信息
#EXT-X-KEY:METHOD=AES-128,URI=".../Video/Download/9be19e28400206b4cc214b8c031eef5d/local_0.key"

测试连接:
:https://s.xlzys.com/play/nelYrW5a/index.m3u8

key 地址:https://s.xlzys.com/play/nelYrW5a/enc.key

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

1 participant