Getting certs and license for DRM
#1
Hi
Im working on addon for drm protected media. The webrowser uses DASH.js for decoding the media and widevine L3. There are two requests first is probably for certificate and second is for license key. How can I tell inputstream adaptive to reproduce those requests? Looking for initialization that was made for dash.js, the original app only pass in the constructor the license server url and aditional headers for authentication. Those I have allready reproduced but content seems to be encrypted, how can I decrypt that data? 
Ex, First request for license is:
2 byte long conetent is "??" and resposne seems to be a ceryficate.
Second one is very long around 700 bytes maybe the challenge?
Do you know the flow of this drm license exchange? What steps should I make to propperly feed input stream adaptive? What terms use to find aditional inforamtion on google?
Reply
#2
Its difficult give you an kind of answer without know what type of service you are trying to use
every service has their configuration and their type of DRM, so there is no common solution that works for all websites

mainly you need three things:
- know the type of DRM (ISAdaptive support some common DRM, but they may not works on all systems, is explained on wiki)
- the manifest url (that could be fixed or not, and have cookies and/or parameters to add)
- the license url where get license for the requested video (this need an appropriate configuration, for example if it is GET/POST req, the headers, type of response)

if you need to specify the server certificate data can be done with this parameter:
https://github.com/xbmc/inputstream.adap...ertificate
also here there is no a standard way, you need to investigate on how the website get it

mainly what you have to do is analize the network flow data

i suggest you to read integration page to know what parameters are needed based on the needed of your service:
https://github.com/xbmc/inputstream.adap...ntegration
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#3
I think you are the one who reversed Netflix right? Under githb wiki I found some videos u have shared, it helped. Actually I made it like 2h after posting this and forgot. Going back to problem...

I had to pass all the data from/to my proxy raw and tell IS.A to pass it to widevine so it can make the decoding. I was thinking(wrongly) that I need some token to decrypt that data and get the license key but NO. CDM is black box that does all the stuff.
I was thinking about token so bad, because my live TV provider is sending one every 5 mins. I expected it to be inportand but while finishing my addon. I found that one channel out of 150 is using that token instand of widevine.

Thanks for answer!
Crudelis
Reply
#4
CastagnaIT may I ask you for detailed help. I got kodi working perfectly fine but how about implemeting this DRM in other app? My target Jellyfin. I would like to use IS.A like in kodi but instead of rendering, get stream and encode it as raw UDP or RTMP, I can do it on software since my IP TV provider requires only widevine L3. In short:
DRM content ->IS.A->FFMPEG (instead of kodi)->Client
                        |
                  Widevine
or
DRM content ->Widevine->FFMPEG->Client
Can you point me to some tutorial or detailed documentation how IS.A uses widevine? What functions are beeing called?

Thank you
Crudelis
Reply
#5
(2022-11-18, 20:23)Crudelis Wrote: CastagnaIT may I ask you for detailed help. I got kodi working perfectly fine but how about implemeting this DRM in other app? My target Jellyfin. I would like to use IS.A like in kodi but instead of rendering, get stream and encode it as raw UDP or RTMP, I can do it on software since my IP TV provider requires only widevine L3. In short:
DRM content ->IS.A->FFMPEG (instead of kodi)->Client
                        |
                  Widevine
or
DRM content ->Widevine->FFMPEG->Client
Can you point me to some tutorial or detailed documentation how IS.A uses widevine? What functions are beeing called?

Thank you
Crudelis

in short no

ISAdaptive is developed for playback only
with a DRM stream is allowed, playback to display or store mode (encrypted, and not supported by ISA)
i don't think it is legal route protected video data through those protocols

However a binary addon like ISA use kodi addon interface to works, it dont works by itself,
is closely related to the kodi player, kodi dont allow to route stream
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#6
Ok thanks, I mean its using L3 only... I can record it with any desktop recorder and video is not "black". Is it illegal? probably, but I'm using it to have all Netflix, Amazon, Disney in one app - Kodi, that is set as android home launcher, so only for my personal use. I guess buying extra 16Gb RAM stick and running vm's with chrome beeing recorder insiade will do the trick.

Or

How can I apply some filters in kodi, better upscaling, post procesing, so IPTV video is not killing my eyes? (I mean its streched, grainy and a lot of compresion => black dots, marks around text that is on white backgorund on 4k display)?
Reply
#7
when a stream is published with DRM protection, it does not matter the type of level, its always DRM protected
recording a DRM video for personal use, could be allowed, if you dont share the content in any way

but this is a difficult theme, and since we do not know the final use that users make
a software like Kodi IMO should not allow this, instead of this, should allow the use of widevine "store mode" capability
to allow an user to download the DRM streams (also commercials) in a legal encrypted way (some app like N€tflix already do it)
but this is not an easy implementation
and given ISA's current state of development will not be considered in the foreseeable future

for upscaling, post proccessing effects i cannot help you, its better you open a new post in an appropriate section
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply

Logout Mark Read Team Forum Stats Members Help
Getting certs and license for DRM0