[solved] hbogo.bg and inputstream.adaptive
#1
Hi there,

I am trying to play a drm encrypted content from hbogo.bg, we dont have an addon for that yet but a guy is writing one as we speak (he'll be doing the login and parsing part, but that will take some time)

hbo.go is using smoothstream + widevine, after a day spent in chrome dev tools I've figured out few things, but I can't understand what inputstream.adaptive.license_data is suposed to be.

From what I can see from the request payload that chrome sends to wv license server, and from their castlab player configuration, it seems to be a widevine header generated from following data:

Code:
"widevineHeader": {
        "provider": "castlabs",
        "contentId": "fkj3ljaSdfalkr3j",
        "trackType": "",
        "policy": ""
    },

here is what I've been trying so far

Code:
# url: https://edgecastcdnsecure.hbogo.eu/3a9da050-05b0-4d3c-9f5f-8068ff892b31/1195671/COMP/movie/mux_2c177faf-f633-4c86-8594-fefd653b6c81.ism/Manifest
url = get_url(action='play', video=video['video'])

license_server = 'https://lic.drmtoday.com/license-proxy-widevine/cenc/'

dt_custom_data = "base64 encoded json string containing my userId and player session id"
x_dt_auth_token = "more base64 encoded known stuff"
headers = 'dt-custom-data=' + dt_custom_data + '&x-dt-auth-token=' + x_dt_auth_token + '&Origin=https://www.hbogo.bg'

license_key = license_server + '|' + headers + '|B{SSM}|'

list_item.setProperty('inputstreamaddon', 'inputstream.adaptive')
list_item.setProperty('inputstream.adaptive.manifest_type', 'ism')
list_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha')
list_item.setProperty('inputstream.adaptive.license_data', 'whatever')
list_item.setProperty('inputstream.adaptive.license_key', license_key)

Anyone can give me a hint?

cc @peak3d

P.S: using kodi v18 and inputstream.adaptive both from git

EDIT: not sure how I posted in wrong category, thanks @DarrenHill
Reply
#2
Thread moved to add-on development.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
k. answering to myself.

after quick look at Bento4 source I think I figured it out, now getting response from wv license server.

Code:
...
headers = 'dt-custom-data=' + dt_custom_data + '&x-dt-auth-token=' + x_dt_auth_token + '&Origin=https://www.hbogo.bg&Content-Ty
pe='
license_key = license_server + '|' + headers + '|R{SSM}|JRlicense'
list_item.setProperty('inputstreamaddon', 'inputstream.adaptive')
list_item.setProperty('inputstream.adaptive.manifest_type', 'ism')
list_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha')
list_item.setProperty('inputstream.adaptive.license_data', 'ZmtqM2xqYVNkZmFsa3Izag==')
list_item.setProperty('inputstream.adaptive.license_key', license_key)
Reply
#4
@peak3d

I am getting
Code:
ERROR: AddOnLog: InputStream Adaptive: Unable to find license in JSON string

am I supposed to use JRlicense ?

EDIT: also solved Big Grin
Reply
#5
I'm at a similar point for my addon to where you got stuck. I can see calls out to https://prod-lic2widevine.sd-ngp.net/proxy and I can get the oauth token to call that api, I'm just not sure how to put it into use.

Is this documented anywhere?
Reply

Logout Mark Read Team Forum Stats Members Help
[solved] hbogo.bg and inputstream.adaptive0