Closed Ukenn2112 closed 1 year ago
The current code is bugged in regard to loading PlayReady Headers. I'll have this fixed in the next stable release, and it's already fixed in master as of now with https://github.com/rlaphoenix/pywidevine/commit/3a910bd03aa3b5376245d25be15b796f5b1aa679
I'm also making further improvements to add further support for PlayReadyObjects and their records.
In regards to actually loading that mspr:pro
value, load it the same way you would a Widevine PSSH, i.e., pssh = PSSH("<the base64 here>")
. Once loaded, you can then convert it with pssh.playready_to_widevine()
. The reason why you probably struggled is because of the bugged loading of PlayReadyHeaders in all stable versions as of right now. As I said it will be fixed in a stable release soon.
As of https://github.com/rlaphoenix/pywidevine/commit/ddc66f0a2bf08d04ef75e1b917d18be328d14d48 I consider this issue Fixed. The final code to load a PlayReadyHeader, then convert it to a WidevineCencHeader, all while autoloading back in the PSSH class is:
from pywidevine import PSSH
pssh = PSSH("pAIAAAEAAQCaAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AeQBaAHkAOAB3AG4AWQBUAEQAMABDAEwAMwBuAE0AcgBuAFAAVQBaAHUAZwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBKAHMAWgBBAEEARgBRAFkANgBsAGMAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAOgAvAC8AcwB0AHIAZQBhAG0AaQBuAGcAMQAuAHgAYwByAGUAYQBtAC4AbgBlAHQAOgA4ADAAOAAwAC8AcABsAGEAeQByAGUAYQBkAHkALwBSAGkAZwBoAHQAcwBNAGEAbgBhAGcAZQByAC4AYQBzAG0AeAA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==")
pssh.to_widevine()
assert(pssh.system_id == PSSH.SystemId.Widevine) # True
(stable patch release soon)
I only found PlayReady's
mspr:pro
in thepmd
file, how can I convert it tocenc:pssh
?