Audio DRM is mostly format specific in that most DRM-capable formats are readily identifiable by their container which is usually reflected in their extension. This is to let the player know what it's dealing with, without having to analyse the file. A common example is an AAC file that you might buy from iTunes. If it's protected with FairPlay DRM the file is named as .m3p (vs the unprotected .m4a).
There's nothing to stop companies encrypting a .mp3 and leaving the extension the same - it's just going to annoy users when they switch to one of the billion available MP3 players and it doesn't work.
For video things can be a little more complicated. Some video container formats support DRM so their extension doesn't neccessarily change. I'd suggest trying to get ffmpeg or themonospot to analyse each file.
Here's a little bash function I've just written that can get the codecs from a file:
oli@bert:~/Desktop$ codec "The Beatles - 01 - Back In The U.S.S.R.mp3"
Audio: mp3
You could trim that down even more but give it a shot on some known DRM-laden media and see what happens. It'll either explode or will tell you about the DRM.
Anyway, once you know what to expect, you can batch that, or something like it to quickly tell you which files have DRM.
To determine DRM on video, you can use ffmpeg -i <filename>
E.g. On a movie purchased from Apple, this can be seen in the output:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] ignoring 'frma' atom of 'mp4a', stream format is 'drms'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] ignoring 'frma' atom of 'avc1', stream format is 'drmi'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] ignoring 'frma' atom of 'ac-3', stream format is 'drms'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] stream 0, timescale not set
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] Could not find codec parameters for stream 1 (Video: none (drmi / 0x696D7264), none, 1920x1032, 5234 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] Could not find codec parameters for stream 2 (Audio: none (drms / 0x736D7264), 48000 Hz, 5.1(side), 384 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc22d005600] Could not find codec parameters for stream 4 (Subtitle: none (p608 / 0x38303670), 1920x1032, 0 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Audio DRM is mostly format specific in that most DRM-capable formats are readily identifiable by their container which is usually reflected in their extension. This is to let the player know what it's dealing with, without having to analyse the file. A common example is an AAC file that you might buy from iTunes. If it's protected with FairPlay DRM the file is named as
.m3p
(vs the unprotected.m4a
).There's nothing to stop companies encrypting a
.mp3
and leaving the extension the same - it's just going to annoy users when they switch to one of the billion available MP3 players and it doesn't work.For video things can be a little more complicated. Some video container formats support DRM so their extension doesn't neccessarily change. I'd suggest trying to get
ffmpeg
orthemonospot
to analyse each file.Here's a little bash function I've just written that can get the codecs from a file:
In action:
You could trim that down even more but give it a shot on some known DRM-laden media and see what happens. It'll either explode or will tell you about the DRM.
Anyway, once you know what to expect, you can batch that, or something like it to quickly tell you which files have DRM.
To determine DRM on video, you can use
ffmpeg -i <filename>
E.g. On a movie purchased from Apple, this can be seen in the output: