6

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 ?

gevorg
  • 4,835
  • 4
  • 35
  • 52
qrtt1
  • 7,746
  • 8
  • 42
  • 62

1 Answers1

6

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.

Guido Domenici
  • 5,146
  • 2
  • 28
  • 38