PDA

View Full Version : A failed attempt to download/decrypt DRM protected video from a viki.com



Fli
09-12-2024, 07:49 AM
I have already installed TamperMonkey from https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/ (I am on Firefox, but Chrome is at https://chromewebstore.google.com/detail/eme-call-and-event-logger/cniohcjecdcdhgmlofniddfoeokbpbpb ) and then https://greasyfork.org/en/scripts/373903-eme-logger in Aim to display in a web browser developer console, Console tab, the details of the encrypted stream.

Restart the browser.

On a new browser tab, opened a dev. console (F12), Network tab and opened URL:
https://manifest-viki.viki.io/v1/license?video_id=1005581v&app=100000a&h_timestamp=1650716082&app_ver=4.0.97&dt=dt3&sig=a8fa82aadfa1c52075aba362c22351d4bb392292

it returned: {"vcode":3,"error":"invalid timestamp","current_timestamp":1726117521}

I am not logged in to viki (have no account, I am unsure if i need any particular one).

I have not been able to find any PSSH anywhere in a dev. console on viki.com.

I can see some EME-Logger.user.js:* entries on a Console tab, like:

Init Data: AAAAV3Bzc2gAAAAA7e+LqXnWS...
Message: CAESqgwKugsIARKeCgrcAggCEhBIa4PbkkFF6EtcACIHk3RqGI nHtK...
Response: CAISvQEKKAoQrAknzJp8mBIuH1dfp2PQ7hIQU...
Key Statuses:
[USABLE] iSlvMc7qQJKWVf3cDS9HqQ==

Someone suggested (https://forum.videohelp.com/threads/412493-EME-Logger#post2713991): On the Console tab filter for "Init Data:" without the quotes.
and it shows:

[EME] (CALL) MediaKeySession::generateRequest
Session ID: (not available)
Init Data Type: cenc
Init Data: AAAAV3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADcIARIQiS lvMc7qQJKWVf3cDS9HqRoLYnV5ZHJta2V5b3MiEIkpbzHO6kCS llX93A0vR6kqAkhE

I suspect that the Init Data: AAAA... is so called PSSH key which is requested by some utilities meant to decode DRM protected videos.

Same AAAA string can be returned by the command: curl https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd|grep -i pssh
(maybe it will run not only on Linux but on Windows too)

I can find some tool for decryption keys https://emarsden.github.io/pssh-box-wasm/get-license/ , but it wants a CDM device in a .wvd format (at https://github.com/devine-dl/pywidevine is some utility that may create it, but I have not understood how to do it).

There is also https://cdrm-project.com/ yet it is not helpful in telling what i am filling wrong and which format is correct.

I am not using Discord in order to use http://getwvkeys.cc which is said to give a decryption keys, which can be then used in the commands:


mp4decrypt.exe --key 5d881c8bb82448d89de510c512a19674:7e9ea1e9a7f67cbe9 8a07aedd43c4ab7 myV.mp4 myV_dec.mp4 # decrypts video myV.mp4
mp4decrypt.exe --key 5d881c8bb82448d89de510c512a19674:7e9ea1e9a7f67cbe9 8a07aedd43c4ab7 myA.m4a myA_dec.mp4 # decrypts audio myA.m4a
ffmpeg -i myV_dec.mp4 -i myA_dec.mp4 -c copy final.mp4 # merges the decrypted video and audio files

There seems to be some not so intuitive alternative https://github.com/medvm/widevine_keys , but that did not work for me.

If there is some simple way to get the decryption keys or the decrypted video file, please kindly share it.