解密 HTTP Live Stream 时出现问题
我有一个单密钥加密的 HTTP Live Stream,可以在 Quicktime 和 iPhone 中很好地解码。我正在尝试创建一个简单的客户端应用程序来解密 ts 文件。现在我已经使用 openssl 来解密。我相信我对 openssl 有正确的参数,并且我正在正确插入密钥和 IV。我可以成功解密流中的第一个 .ts 文件,但之后无法解密。我正在使用在此处的档案中找到的以下脚本,并反转进行解密:
#!/bin/sh hexKey=$(cat encryption.key | hexdump-e '16/1 "%02x"') hexIV='00000000000000000000000000000001' openssl aes-128-cbc -d -in ./multi_2.ts -out ./clear.ts -p-nosalt -iv ${hexIV} -K ${hexKey}
其中:
Encryption.key 是我从 M3u8 流文件中检索到的密钥文件。
multi_2.ts 是 m3u8 流文件中的第二个 .ts 文件。
任何帮助将不胜感激。
I have a single key encrypted HTTP Live Stream which decodes fine in Quicktime and iPhone. I'm trying to create a simple client application to do the decryption of the ts files. Right now I've used openssl to decrypt. I believe I have the correct arguments to openssl and I'm inserting the key and the IV properly. I can successfully decrypt the first .ts file in the stream but fail to decrypt after. I'm using the following script which I found in the archives here and I reversed to do decryption:
#!/bin/sh hexKey=$(cat encryption.key | hexdump-e '16/1 "%02x"') hexIV='00000000000000000000000000000001' openssl aes-128-cbc -d -in ./multi_2.ts -out ./clear.ts -p-nosalt -iv ${hexIV} -K ${hexKey}
where:
encryption.key is the key file I retrieved from the M3u8 stream file.
multi_2.ts is the second .ts file in the m3u8 stream file.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
后续的 .ts 文件可能没问题,您只需将它们合并到一个文件中即可播放:
The subsequent .ts files are probably fine, you just need to join them into one file in order to be playable:
hexIV='00000000000000000000000000000001'
应该是:
hexIV='0000000000000000000000000000002'
因为 multi_2.ts 是 m3u8 流文件中的第二个 .ts 文件。
hexIV='00000000000000000000000000000001'
should be :
hexIV='00000000000000000000000000000002'
as multi_2.ts is the second .ts file in the m3u8 stream file.