Detecting DRM protected files

Martijn van Rheenen rheenen at gmail.com
Tue Mar 29 16:27:17 CEST 2011


Ooops, I see you were way ahead of me! Thanks for that quick fix!!!!

Is it possible that I submit the 'protected' extension to WMA / ASF file
reading or should I leave it up to you? ;)

On Tue, Mar 29, 2011 at 4:24 PM, Martijn van Rheenen <rheenen at gmail.com>wrote:

> Would agree on putting in in the properties too, I will look into that. I
> am just finishing the MP4 reading part right now...
>
> 2011/3/29 Lukáš Lalinský <lalinsky at gmail.com>
>
>> On Tue, Mar 29, 2011 at 2:28 PM, Martijn van Rheenen <rheenen at gmail.com>
>> wrote:
>> > MP4 DRM protection:
>> > Something with a 'drms' atom should be detected, if it's present, the
>> file
>> > is DRM protected. But I can not find proper documentation on the MP4
>> > fileformats to know where to find this atom (I know it should be in the
>> > 'moov' atom, but then the info I found stops...)
>>
>> It seems to be at moov.trak.mdia.minf.stbl.stsd.drms. Just checking
>> for the presence of the atom should be probably enough. I've tried it
>> on a file that I found somewhere and it seems to work.
>>
>> https://github.com/lalinsky/taglib/commit/97cd58bc
>>
>> > WMA DRM protection:
>> > In TagLib's asffile.cpp you could add to the list of ByteVector's at the
>> > near-top of the file:
>> > static ByteVector
>> >
>> asfContentEncryptionGuid("\x22\x11\xB3\xFB\xBD\x23\x11\xD2\xB4\xB7\x00\xA0\xC9\x55\xFC\x6E");
>> > static
>> >
>> ByteVector asfExtendedContentEncryptionGuid("\x29\x8A\xE6\x14\x26\x22\x4C\x17\xB9\x35\xDA\xE0\x7E\xE9\x28\x9C");
>> > Then in ASF::File::read():
>> > Change:
>> > else {
>> >   obj = new UnknownObject(guid);
>> > }
>> > To:
>> > else {
>> >   if (guid == contentEncryptionGuid || guid ==
>> > extendedContentEncryptionGuid) {
>> >     d->tag->setDRMProtected(true);
>> >   }
>> >   obj = new UnknownObject(guid);
>> > }
>>
>> This part seems fine, but I think that the information should go into
>> ASF::Properties, not ASF::Tag (especially not defining a new WM
>> attribute). Any chance you have a file I can test this against?
>>
>> Lukas
>> _______________________________________________
>> taglib-devel mailing list
>> taglib-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/taglib-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20110329/13441f63/attachment.htm 


More information about the taglib-devel mailing list