dash-mpd-cli
dash-mpd-cli copied to clipboard
native decryption
running a command like this:
dash-mpd-cli --key 21b82dc2ebb24d5aa9f8631f04726650:602a9289bfb9b1995b75ac63f123fc86 `
http://example.com/v1/dash/196861183/manifest.mpd
I get this result:
Download failed: I/O error spawning mp4decrypt
I think it would be helpful if the tool here could just do the decryption itself. have you searched for any decryption crates?
Patches are welcome!
have you searched for any decryption crates?
Decryption is not actually the most complicated aspect here. CENC content protection doesn't involve encrypting a full file, but rather encrypting media fragments. It requires reading and writing specific box types for MP4 containers, and specific Element types for WebM/Matroska containers. Unfortunately, there are currently no mature crates that I know of for reading and writing MP4 and WebM container formats. This is why external helper applications are used.
To simplify the process of installing a bunch of external dependencies (and for better internet hygiene!), I recommend you run dash-mpd-cli in a podman container; see
https://emarsden.github.io/dash-mpd-cli/container.html
FYI if it helps I have a minimal implementation here
https://github.com/3052/sofia
1649 LOC using scc -n _test.go - its a different language but might be a good start point