4

How can I verify if a file is protected by DRM?

On OS X, by command line or by other methods.

  • Not being familiar with OSX, is there not a properties section for the file, probably in an Advanced area which states it is protected? – Aaron McIver Dec 12 '11 at 15:09
  • You're right, it's in the "More Info" of the file info panel in the Finder. – ıɾuǝʞ Dec 12 '11 at 19:38
  • Added as answer for future visitors. – Aaron McIver Dec 12 '11 at 19:40
3

As Daniel Beck noted in comments, you can use the mdls command to get the file metadata. The kMDItemKind field should hold the info you’re looking for.

$ mdls plain-mp3.mp3 | grep kMDItemKind
kMDItemKind                     = "MP3 audio"

$ mdls protected-aac.m4p | grep kMDItemKind
kMDItemKind                    = "protected MPEG-4 audio"

$ mdls unprotected-aac.m4a | grep kMDItemKind
MDItemKind                    = "Apple MPEG-4 audio"

(Note also the different extensions, .m4a vs. .m4p.)

1
mplayer $filename

If you hear sound, there are no (effective) restrictions.

mplayer can be obtained from this place.

1

In the finder, just Get Info on your file, and look at the More Info area. Within this area of the info panel it should state whether the file is protected or not. Here's an example of a protected AAC file:

Part of info panel

  • Probably also in the Spotlight metadata (mdls on the command line) – Daniel Beck Jul 14 '12 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.