How to detect the usage rights (DRM) of a file
-
19-09-2019 - |
Question
Suppose you have a .wma / .wmv file and you want to detect:
- is it DRM protected ?
- (then hopefully) details of the DRM protection (like when does the license expire etc.)?
Is there a C# / C++ api for it? It seems that Windows Media Player can do it - if you click properties on that file... but Explorer does not show this info.
Note: I do not belive this is a trivial question, I have tried taglib and searched the web for a solution for about 2 hours now.
OTHER TIPS
One method of detecting DRM files under a folder using Powershell is: -
$wmplayer = New-Object -ComObject "WMPlayer.OCX"
ls -recurse | ? { $_.Name -like "*.wma" -and [bool]::Parse($wmplayer.newMedia($_.FullName).getItemInfo("Is_Protected")) }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow