我使用了库(libavformat和libavcodec)来解码一些MMS流式网址。但其中一些受DRM保护。当我尝试解码它们时,库会发出警告
在libavformat / asfdec.c中:
if (!s->keylen) {
if (!guidcmp(&g, &ff_asf_content_encryption)) {
av_log(s, AV_LOG_WARNING, "DRM protected stream detected, decoding will likely fail!\n");
} else if (!guidcmp(&g, &ff_asf_ext_content_encryption)) {
av_log(s, AV_LOG_WARNING, "Ext DRM protected stream detected, decoding will likely fail!\n");
} else if (!guidcmp(&g, &ff_asf_digital_signature)) {
av_log(s, AV_LOG_WARNING, "Digital signature detected, decoding will likely fail!\n");
}
}
变量s是struct AVFormatContext。我的问题是从哪里拿到钥匙?它似乎用DRM密钥对其进行解码。
我查看ASF规范,并尝试patch asfdec.c。现在,我有获取许可证URL和密钥ID。问题可以改写为“是否有适用于Linux的MS-DRM客户端库?” (旧:如何通过ffmpeg解码带有DRM的MMS流媒体网址?)
是否可以使用许可网址和密钥ID获取内容密钥?
答案 0 :(得分:6)
原则上你可以从微软许可PlayReady Device Porting Kit,但它会让你回到50,000美元。它是标准ANSI C,它将为Linux编译,它可以解密Windows Media DRM和PlayReady ASF流。我相信在Linux上没有其他方法可以做到这一点。