Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a MS-DRM client library for linux?

I have used the libraries (libavformat and libavcodec) to decode some MMS streaming urls. But some of them are protected by DRM. When I try to decode them, the library will warn about it

In 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");
    }
}

The variable s is the struct AVFormatContext. My question is where to get the key? It seems to decode it with a DRM key.


I look the ASF Spec, and try to patch asfdec.c. Now, I have the acquiring license URL and key id. The problem can rewrite as 'Is there a MS-DRM client library for linux?' (old: How to decode a MMS streaming url with DRM by ffmpeg?)

Is it possible to use the license url and key id to get content key ?

like image 270
qrtt1 Avatar asked Nov 16 '10 06:11

qrtt1


1 Answers

In principle you can license the PlayReady Device Porting Kit from Microsoft, but it's gonna set you back $50,000. It is standard ANSI C, it will compile for Linux, and it can decrypt both Windows Media DRM and PlayReady ASF streams. I believe there are no other ways to do this on Linux.

like image 60
Guido Domenici Avatar answered Oct 07 '22 05:10

Guido Domenici