xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
452 stars 241 forks source link

RTPPlay decrypt failed with error 2 #1034

Closed CastagnaIT closed 2 years ago

CastagnaIT commented 2 years ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

This stream start correctly for the first seconds of unencrypted video, when start decrypting fails with

2022-08-20 14:34:39.911 T:24092   DEBUG <general>: AddOnLog: inputstream.adaptive: WV_CencSingleSampleDecrypter::DecryptSampleData: Decrypt failed with error: 2 and key: B57FD50083E83BFD85BBC31A32CF47E1
2022-08-20 14:34:39.911 T:24092   ERROR <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!

the stream come from https://www.rtp.pt/play/p9165/e562949/por-do-sol

#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://lic.drmtoday.com/license-proxy-widevine/cenc/||R{SSM}|
#KODIPROP:inputstream.adaptive.stream_headers=User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
https://streaming-vod.rtp.pt/drm-dash/nas2.share/h264/512x384/p9165/p9165_1_20210816161007e001t1185d.mp4/manifest.mpd

i dont know if i have construct in bad way the license_key or if there is someelse

ref. @enen92 for RTPPlay addon

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Actual Behavior

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Look at STRM

Debuglog

The debuglog can be found here: https://paste.kodi.tv/ofukisixif.kodi

MPD/M3U8s/ISM

An example or copy of a manifest (or manifests for HLS - master and variants) can be found here: DashManifestRTPPlay.txt

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

glennguy commented 2 years ago

Must be an issue with license key:

2022-08-20 14:34:37.118 T:21140   ERROR <general>: CCurlFile::CReadState::XFILE::CCurlFile::CReadState::FillBuffer - (0x13fd4b906d0) Failed: HTTP returned code 500
2022-08-20 14:34:37.119 T:21140   ERROR <general>: CCurlFile::XFILE::CCurlFile::Open - <https://lic.drmtoday.com/license-proxy-widevine/cenc/> Failed with code 500:

Should be fine if this can be corrected

CastagnaIT commented 2 years ago

Yeah i fixed it!

@enen92 now you can playback video content with DASH manifest in this way:

#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://lic.drmtoday.com/license-proxy-widevine/cenc/|Content-Type=application/octet-stream&User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36&Host=lic.drmtoday.com&x-dt-custom-data=eyJ1c2VySWQiOiJwdXJjaGFzZSIsInNlc3Npb25JZCI6InAwIiwibWVyY2hhbnQiOiJtb2dfcnRwIn0=&Origin=https://www.rtp.pt|R{SSM}|JBlicense
#KODIPROP:inputstream.adaptive.stream_headers=User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36&Origin=https://www.rtp.pt
https://streaming-vod.rtp.pt/drm-dash/nas2.share/h264/512x384/p9165/p9165_1_20210816161007e001t1185d.mp4/manifest.mpd

the x-dt-custom-data header i think its a fixed value at least for free content

enen92 commented 2 years ago

Awesome :) thanks! Will try to check from where that value comes from