如何通过python将许可请求包装到drmtoday服务器

问题描述 投票:0回答:1

我正在尝试模拟python中的drm媒体播放,所以我从castlab“ https://demo.castlabs.com/”的演示开始,我正在测试的视频是MPEG-DASH格式,而drm系统是通过cenc提供的(如果是怎么说的话),这是视频的网址

https://demo.cf.castlabs.com/media/msspr/Manifest?v=5.1.38

密钥ID为:

8bdf77c0-5665-46c5-8ec8-422e571fc000

而pssh是:

AAAAVHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADQIARIQi993wFZlRsWOyEIuVx/AABoIY2FzdGxhYnMiEIvfd8BWZUbFjshCLlcfwAAqAlNE

schemeIdUri(widevine)是:

edef8ba9-79d6-4ace-a3c8-27dcd51d21ed

和DRM服务器网址:

https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/

drm服务器需要一个自定义标头巫婆是:

dt-custom-data: eyJ1c2VySWQiOiJwdXJjaGFzZSIsInNlc3Npb25JZCI6InAwIiwibWVyY2hhbnQiOiJzaXgifQ==

并且永远不要更改从:]编码的base64。

{"userId":"purchase","sessionId":"p0","merchant":"six"}

并且它还需要主体请求或有效载荷请求,这就是我的问题所在我能够从chrom开发人员工具捕获到arraybuffer中的主体请求,并将其转换为base64,这就是我发现的内容。

CAESyR8STApKCjQIARIQi993wFZlRsWOyEIuVx/AABoIY2FzdGxhYnMiEIvfd8BWZUbFjshCLlcfwAAqAlNEEAEaEO9+id0bff5JFPIQdYcCqRoYASDtl+rzBTAVQu4eChJzdGFnaW5nLmdvb2dsZS5jb20SEChwNFTACPY2GK3nRD22xMgasByr1bNXgrfr+XFlzU+UcctZsvWfVXNmF9vKXmkIBD7/Ivlx6fq7KNVx/izq28XI3axu6FPqPgb4NUTURq0SeuJnYzLLPItXccgCeZrgpqBbXoxLy716wO10/mIMTyb4pIMNoPVHdnm08MD+vKIYY0Xm7ZQ4ZYSljcDolY8tePvDD+hsJSZ+BDLJiQ57PQHSsrjAH90F6N3TIK0RgEAXk+Sm9oe1qQa4W9QQQQq6SUsLqA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atSAWoIy3dTKfuaTuTBrjAvVf6Dbl1ZcK3FVfjxM1LprDT52hTuLhO5hb12sXWfg0nqd/m7OB7giBncDH3B/4qTMP8saCR3p3WKf8M0bEoDYLRnKHULbke7n+B4GzPM4iwqSxT1WJaydKgdQdsD3zmLXwTVTXD+k669JtxP0hxFT9jK+NAOOaUV/3ITCGzO5H2CetI534549s8HY+CYLZdofc4Ozzi8u3C3ix8AA+7oc73+uNhr8Nj7Z6jTsrlvOXoevW7UVVB0CzVufK9gfnzAodK+CO2tWzyIQLn7uNn6/Yd4XwCkDQPR4qCqAAiZNMFcg8nC83o6ZkZC5ofOoVkHs+zwpHS2fQ/dBj8BqJqAxjmnOnKS+vX3rZ8u4C/6VRIa3sqhMjbnQgEVO6NJ4kKKBk/9saU34eBXkEKLH3Trcph9KUxyt7FG0XcPc6QcmSrtPPu17Az7ght5GpAhk02DSq3s6jAKx3C6JlunHEr/HhBclL83n8BNia76ArZ7Hs291kd68sysS5edaw4plPyN9hL9wgBc1D79wFVC9yYlgP7z/XOdSiF4N1z35G5nl6UxBvtdqYTLYCw2+LG3Vhznf7GdCel5keCoM/g5doWyi2FqRyTshYdcfk2jseYJ96tC3BE64UwT20WlSYwwagAKSEYJ37jGNCidW/AJHF4H3gKxhNVWSAqun5aY2ZJum9y6R20zlDr269U496Fplcb1wEWgLWBJVgd1yVpbhPR8JbaIPMenOsPO4h/XlKHq/LxsqFL9J/X5V1kwjerBkFdHneb93HCe1nTdyczNMwPymkm1LxinLMG1eJ7Y8YDlWWlFVXQJN7hIH2TUuozxDZTnC9XFfSRdNIjagWu2fujKrZjV+KjqD7VztIocL5LaYLnxPobQsSNGDqTih6qwU6EhHv90e2e1BT5G0yW7RIMYfe83SfW1lyoXWxq/YZieapVolSTY1rQ6zNVcsG0GmBDzm2ZVVKS5PCOuZiW6t4q+T

我真的不知道这段代码是如何形成的,我知道它已转换为arraybuffer“ Unit8和” int8“并用作对服务器的主体请求,我处理了base64代码并尝试在此站点中解码” [C0 ]”,它为我提供了有关许可证请求的信息,例如证书和序列号,签名以及pssh数据和内容ID,算法(AES-CTR)现在,由于存储在该base64代码中的大多数信息都在我的手中(pssh,kid,系统ID),我想知道如何以生成和使用base64代码相同的方式来创建\ build \ wrapper请求它在python

我正在尝试模拟在python中播放的drm媒体,因此我从castlab“ https://demo.castlabs.com/”的演示开始,而我正在测试的视频是MPEG-DASH格式和drm系统是...

wrapper licensing mpeg-dash drm widevine
1个回答
0
投票

该请求是通过EME API https://tools.axinom.com/decoders/LicenseRequest与浏览器中的CDM交互生成的。您可以使用以下方法了解更多信息:https://w3c.github.io/encrypted-media/

也许这有助于从Python调用Chromium:https://chrome.google.com/webstore/detail/eme-call-and-event-logger/cniohcjecdcdhgmlofniddfoeokbpbpb

© www.soinside.com 2019 - 2024. All rights reserved.