Detecting DRM protected files

Lukáš Lalinský lalinsky at
Tue Mar 29 11:32:34 CEST 2011

On Tue, Mar 29, 2011 at 11:15 AM, Martijn van Rheenen <rheenen at> wrote:
> Now, to the real question: I want to be able to detect whether a file is DRM
> protected. So, not only MP3, but also WMA, MP4-based files etc. Is there a
> proven method to find this in a most generic and fast way for a file? Or do
> I have to resort back to file-type-specific code like I had to do for Album
> Art? Note that I just want a 'bool isDRMProtected()' method for this,
> nothing more.

I think you will have to do some research on this, because TagLib
doesn't currently expose this kind of information. I wasn't even aware
that MP3 files can be DRM-protected. For WMA and MP4 it should be
possible to implement the checks in TagLib, as it has to read the
internal structures anyway, but I'm afraid that you can't do that
without patching TagLib. I'm willing to write the necessary code this,
but I'd need a pointer where to look for the bits and some examples of
DRM-protected files (I don't have any).

> I already noticed the ID3v2 has a 'isProtected()' method, but don't know
> whether that means 'DRM protected' or not...

No, it means CRC checksum protection.


More information about the taglib-devel mailing list