6ba6765d32 | ||
---|---|---|
README.md | ||
example_five.png | ||
example_four.png | ||
example_one.png | ||
example_three.png | ||
example_two.png | ||
get_pssh_from_init.py |
README.md
Obtaining PSSH
Getting started
3 methods to find PSSH:
-
The simplest one: PSSH is clearly indicated in MPD file. Download MPD file (browser add-on "MPD Detector" will give you MPD link or filtering for
mpd
in thenetwork
tab of devoloper tools (ctrl + shift + c)), open it with Notepad, search for pssh value. -
If there is KID, but no PSSH in MPD, calculate PSSH by using KID:
Using this website you can get the PSSH by entering in the urn:uuid:
into the System ID
field and entering the cenc:default_KID=
into the KEY IDs
field without the quotes ""
- EME Logger Script (installed on Tampermonkey add-on) will give you init data. That's your PSSH. This can be found on Developer Tools (ctrl + shift + c) > Console, in the filter bar search for
MediaKeySession::generateRequest
you will find Init Data.
Optional, may be rquired:
If that Init Data is very very long, convert it to HEX: https://base64.guru/converter/decode/hex
Here's what mine looked like before conversion.
After Base64 > HEX conversion, you will find a Widevine-PSSH box, this can be found easily by searching with ctrl + f and searching for 70737368
PSSH header is always in a 000000xx70737368
where the xx
is varied and can be from 1-9 in both x spots.
You always want to copy the 6 0
's before the xx as well.
The end of the header is always then followed by 8 more 0
s, if you see this, you are in the right place.
Once you find the header start at the beginning 0 from the header and copy until the end of the converted hex, it should look like this
In this case the full value was 000000577073736800000000edef8ba979d64acea3c827dcd51d21ed0000003708011210162f7d326cf24f6dbd1319bc572bbc151a0b62757964726d6b65796f732210162f7d326cf24f6dbd1319bc572bbc152a024844
convert the hex back into base64 using https://base64.guru/converter/encode/hex
In this case we got the PSSH value of AAAAV3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADcIARIQFi99MmzyT229Exm8Vyu8FRoLYnV5ZHJta2V5b3MiEBYvfTJs8k9tvRMZvFcrvBUqAkhE
Congrats, you have the PSSH!