emilsvennesson / kodi-viaplay

Viaplay for Kodi
GNU General Public License v3.0
30 stars 19 forks source link

MPEG-DASH (inputstream.adaptive) and Widevine CDM #9

Closed emilsvennesson closed 7 years ago

emilsvennesson commented 7 years ago

As discussed in #7, Viaplay has started to implement FairPlay DRM on their sports content -- a DRM technology only supported on Apple devices. This is probably going to spread and eventually affect all content, which means that a move away from HLS is inevitable in order for this project to live on.

Viaplay is using MPEG-DASH with Widevine encryption on Google Chrome as well as the Android platform. This is somewhat good news, because it /should/ be possible to implement in a similar way to the Netflix (https://github.com/asciidisco/plugin.video.netflix) and Sky Go (https://github.com/trummerjo/plugin.video.skygo) add-ons. This is however rather poorly documented and there is not a lot of add-ons using this method to take inspiration from.

I have done some testing but haven't yet been able to figure it out. It's easy to get the MPEG-DASH manifests from the Viaplay API by using 'pcdash' as deviceKey (see https://github.com/emilsvennesson/kodi-viaplay/blob/master/resources/lib/vialib.py#L124). The API will then return an .mpd manifest along with a templated URL for the request to the Widevine license server. However, an additional parameter called '_widevineChallenge' is required to complete the license request that I can't for my life figure out how to generate.

I'd happily take any help or pointers on this. Feel free to hit me up on #kodi-dev at freenode or by simply responding to this issue. :-)

deleder commented 5 years ago

@deleder If it works in browser, it will work with kodi, too.

Thanks for your reply, and sorry for my late answer. What browser are you referring to? TV 2 sumo is browser based streaming service. They use DASH widevine for Chrome, Chromecast and Android. HLS for iOS and Smooth streaming for Smart TV and Playstation.

Thanks!