解密 HTTP Live Stream 时出现问题

发布于 2024-09-18 12:20:38 字数 551 浏览 2 评论 0原文

我有一个单密钥加密的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把昨日还给我 2024-09-25 12:20:38

后续的 .ts 文件可能没问题,您只需将它们合并到一个文件中即可播放:

cat clear*.ts > joined.ts

The subsequent .ts files are probably fine, you just need to join them into one file in order to be playable:

cat clear*.ts > joined.ts
猫瑾少女 2024-09-25 12:20:38

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文