xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
443 stars 240 forks source link

Widevine stream doesnt play #117

Closed mogllee closed 6 years ago

mogllee commented 6 years ago

Hello,

I am trying to play a stream broadcasted from my TV provider. Unfortunately, it is GEO blocked and available to valid subscribers only.

I created the following .STRM file

#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://tatasky.live.ott.irdeto.com/Widevine/getlicense?CrmId=tatasky&AccountId=tatasky&ContentId=400000015&SessionId=****&Ticket=*****||A{SSM}
https://delta2tatasky.akamaized.net/out/i/106.mpd

The log reports,

11:44:56.103 T:140422665949824  NOTICE: VideoPlayer::OpenFile: https://delta2tatasky.akamaized.net/out/i/106.mpd
11:44:56.555 T:140422138451712  NOTICE: Creating InputStream
11:44:58.466 T:140422665949824  NOTICE: VideoPlayer::OpenFile: https://delta2tatasky.akamaized.net/out/i/106.mpd
11:45:00.937 T:140422138451712  NOTICE: Creating Demuxer
11:45:01.084 T:140422138451712   ERROR: Open - error probing input format, https://delta2tatasky.akamaized.net/out/i/106.mpd
11:45:01.084 T:140422138451712   ERROR: OpenDemuxStream - Error creating demuxer
11:45:01.085 T:140422138451712  NOTICE: CVideoPlayer::OnExit()

Chrome devtools shows the following for a successful playback

General
Request URL:https://tatasky.live.ott.irdeto.com/Widevine/getlicense?CrmId=tatasky&AccountId=tatasky&ContentId=400000015&SessionId=****&Ticket=****
Request Method:POST
Status Code:200 
Remote Address:13.126.192.200:443
Referrer Policy:no-referrer-when-downgrade

Response Headers
access-control-allow-origin:*
cache-control:private
content-length:716
content-type:application/binary
date:Sat, 03 Feb 2018 11:21:56 GMT
server:Microsoft-IIS/8.5
status:200
x-aspnet-version:4.0.30319
x-powered-by:ASP.NET

Request Headers
:authority:tatasky.live.ott.irdeto.com
:method:POST
:path:/Widevine/getlicense?CrmId=tatasky&AccountId=tatasky&ContentId=400000015&SessionId=****&Ticket=****
:scheme:https
accept:*/*
accept-encoding:gzip, deflate, br
accept-language:en-US,en;q=0.9
content-length:2
origin:https://watch.tatasky.com
referer:https://watch.tatasky.com/live-tv/channel/SONY-HD/15?pageType=live-tv
user-agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Query String Parameters view parsed
CrmId=tatasky&AccountId=tatasky&ContentId=400000015&SessionId=****&Ticket=****

Request Payload


The Request Payload above is something in binary. I am not sure how to get that. The 'Preview' tab in Chrome shows a long string which seems to be some sort of key.

Is it possible to play this in Kodi?

mogllee commented 6 years ago

MPD file attached 106.mpd.txt

mogllee commented 6 years ago

Just to add the stream is available in various formats,

"dashPlayreadyLicenseUrl": "https://tatasky.live.ott.irdeto.com/playready/rightsmanager.asmx?CrmId=tatasky&AccountId=tatasky&ContentId=400000015",
"dashPlayreadyPlayUrl": "https://delta2tatasky.akamaized.net/out/i/107.mpd",

"dashWidewineLicenseUrl": "https://tatasky.live.ott.irdeto.com/Widevine/getlicense?CrmId=tatasky&AccountId=tatasky&ContentId=400000015",
"dashWidewinePlayUrl": "https://delta2tatasky.akamaized.net/out/i/106.mpd",

 "ssPlayreadyLicenseUrl": "https://tatasky.live.ott.irdeto.com/playready/rightsmanager.asmx?CrmId=tatasky&AccountId=tatasky&ContentId=400000015",
"ssPlayreadyPlayUrl": "https://delta2tatasky.akamaized.net/out/i/141.ism/Manifest"

I guess Widevine is the supported format in Kodi.

mogllee commented 6 years ago

The full kodi log file is at https://pastebin.com/S68XWhc3

mogllee commented 6 years ago

The following works, la_url='https://tatasky.live.ott.irdeto.com/Widevine/getlicense?CrmId=tatasky&AccountId=tatasky&ContentId=400000015&SessionId=****&Ticket=*****' playitem.setProperty('inputstream.adaptive.license_key', la_url+ '|User-Agent=Mozilla%2F5.0%20(X11%3B%20Linux%20x86_64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F49.0.2623.87%20Safari%2F537.36&Content-Type=|R{SSM}|')

vipu19 commented 6 years ago

did you managed to get it working? Does it work in VLC?