Closed Vikassm73 closed 2 years ago
by reading this: https://www.expressplay.com/developer/restapi/#widevine-license-token-request seems that GET request is accepted, then you could try as:
license_key = '%s|%s||' % (lic_url,urllib_parse.urlencode(header))
and you have to remove the inputstream.adaptive.pre_init_data
property,
because you have not integrated a proxy in the addon to handle these data
Tried various combination. Removed pre_init_data but result is the same. But now error message
{"error":{"code":-6005,"message":"[-6005] Invalid key data specified"}}
request details which I got from mitProxy are as below
All I can suggest is to run mitmproxy on both your browser and Kodi and compare the requests side by side. The content length in Kodi will be smaller as it won't include a certificate (only happens automatically on VMP capable clients)
By the way, happy to try and help but this isn't an issue with inputstream.adaptive. You need to figure out the correct info to generate a valid license response (if it is possible on your Windows device, again VMP...) and we can only do so much to help from our position with no access to the streaming service ourselves.
Will you please try to play below link. Don't know will it play at your region. It's a free link. Just need to do OTP login by giving your mobile number. (Make sure that add block is off).
https://www.sonyliv.com/shows/tabbar-1700000804/karam-din-1000139592?watch=true
Thanks for the link, very helpful.
Playback is fine:
The .strm file used:
#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://wv.service.expressplay.com/hms/wv/rights/?ExpressPlayToken=BQA2T1gfKcwAJDFhZWU2MmNiLTA2YzQtNDFmZC1iZjdkLWRhZDg2NWFlNWNmYwAAAGCt8X6s3--cJEC0nEH98Xh3gKB3SoAEPSnVCL02Mp0iypLys7BjcMp3a5hDAGaj7usSSGigvOUTJ-SUrv8nI_B-jmFPcdrP_l0V5k4EUysp72v8xJHHXMg1f1ftrA3jvuQvPoXobvL4YbQ6Z6im9MOsovpVqQ|Content-Type=|R{SSM}|
https://drm.sonyliv.com/DASH/40cb132c-7751-42f7-b1f8-4b27498e3e4c/show_original_tabbar_ep01_20211014T155116.mpd?hdnea=exp=1649109043~acl=/DASH/40cb132c-7751-42f7-b1f8-4b27498e3e4c/show_original_tabbar_ep01_20211014T155116.mpd*~id=893d7907c7814c6fbdded3e0e0de68ea-1649065774913-2204040950252761329~hmac=4c5e382036bbc849a74a9463b841c1794fddb643f8e863e285f107c12ce98923&c3.ri=6905184441801560315|x-playback-session-id=4cdd183a00bc4264b48fb39ecabc955c-1649066038633
The license URL comes from the POST to https://apiv2.sonyliv.com/AGL/1.4/R/ENG/WEB/AU/CONTENT/GETLAURL
I'm not sure what you've been trying but the license URL will be different for each video and possibly each user.
Thanks for your help. Mistake was there in only one line. I got proper format now. Once again thanks
license_key = '%s|Content-Type=|R{SSM}|' % (lic_url)
Getting following Error
{"code":-7008,"message":"[-7008] Failed to generate Widevine license"}
Used below code
`
lic_url='https://wv.service.expressplay.com/hms/wv/rights/? ExpressPlayToken=BQA2T1gfKbEAJDFhZWU2MmNiLTA2YzQtNDFmZC1iZjdkLWRhZDg2NWFlNWNmYwAAAGAEG4NJ8ieotdjr2q4LTC25ScrNnzwZw0SgnLUoYSdoHROENN9IQjw6c1GStYsbvX_kRQct5T8dzOh_YhcYZKA7eDeSf-8w5Tzsv93ibApFBqd076oNVdpnANdToFCI2bWT_vXVdzkgjDhQHqR1zpoFbxDysQ'
license_key = '%s|%s|R{SSM}|' % (lic_url,urllib_parse.urlencode(header)) play_item.setProperty('inputstream.adaptive.license_key', license_key)
`
Found some additional Information but don't know how to use this in the code
checksum: "OrI/z/NJC6g=" drm_video_kid: "d207816247ec43429c56e4497d72" kid_mss: "YoEH0uxHQkOcVuRJfXIAAA==" signature: "07857f0a77df2c86a54a41a5ddb7b43a55db83091dc5cf3c8b059c88c66ff49bfb9669d27c64f0f9e4894fb9e1808665768dc219901d4a5bd637524b74f2d3bab12bf3c8e958e97dc6798f7131448229dda0c71a5ed51bc8fdd0de55c2de868c226f3c95170beabe6eb4170ac48de59cdfc8948b33ea3ce88852d8f247ed9ffc"
Please advise
Error Log : kodi.log
URL Manifest: https://pastebin.com/8RWLXdZp