Wednesday 23 October 2019

macos - Check if audio file contains DRM


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


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



Answer



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.)


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...