wvproxy

Widevine CDM API

Setup

  1. Install Python 3.6 or newer and Poetry
  2. Install Python package dependencies using poetry install
  3. Activate the virtual environment using poetry shell
  4. Run the Flask web app using python wvproxy.py (this part can run on any OS)
  5. Open the web app on a Windows computer with Chrome and widevine-l3-guesser installed and leave it running
  6. (Optional but recommended) Put the API behind a reverse proxy such as nginx for HTTPS support
  7. Put one or more users and keys in authorized_users.txt in TSV (tab-separated values) format:

alice	e50af8c5-02ef-4546-8449-77ab4cf8a271
bob	5fdb1375-e529-4f51-a8a4-9296bfadedfa

API request format

Get challenge

Request

<div class="highlight highlight-source-json position-relative" data-snippet-clipboard-copy-content="{
"method": "GetChallenge",
"params": {
"init": "",
"cert": ""
},
"token": ""
}
“>

{
  "method": "GetChallenge",
  "params": {
    "init": "<pssh as base64>",
    "cert": "<service certificate as base64>"
  },
  "token": "<user key from authorized_users.txt>"
}