overriding license of m3u8 by license of mpd in kodi
#1
Hi,
I want to retrieve the license of an mpd  live strream and apply it to the same stream which is m3u8 hls (which has not the widevine data, but the KID is accepted by content provider widevine licensing serverr), is there a simple way?
A  way would be using a proxy and modify the m3u8 with the widevine information of the mpd, but that's too complex for now.

Thanks in advance..
Reply
#2
its not so clear the situation,
if the child variant HLS manifest has not the EXT-X-KEY its not encrypted
otherwise should exist at least the pssh data in the URI

if you attach the original child variant manifest i can try understand the use case
also a full kodi debug log to see what happens
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#3
Thanks for your reply.
Let's see, the situation is like this:
I have access to a stream from my isp, it is offered as mpd and m3u8 format,
mpd uses tokens in the url, m3u8 doesn't, that's why I want to use m3u8,
the hls uses for ext-x-key apple key delivery, so this is no option in kodi
the data in the mpd can retrieve a  key that works for the hls stream,
I want to load the m3u8 video but use the mpd for the widevine process and then use the license data from the mpd to decrypt the hls segments.

It's similar to this:
https://github.com/xbmc/inputstream.adaptive/issues/353
Reply
#4
now idk why you avoid use MPD "tokens" instead of make a chimera

i want mention that if these tokens need to be set as url parameters, you can use these props:
https://github.com/xbmc/inputstream.adap...est_params-
https://github.com/xbmc/inputstream.adap...eam_params-

but if these tokens needs to be updated while in playback, then its hard to do
you need to use a proxy and route all network flow, something similar what done here
https://github.com/xbmc/inputstream.adap...nd-license
so you need also to change manifest endpoints so not easy to do...

otherwise you can continue with your chimera,
and try find a solution by providing a custom manifest
https://github.com/xbmc/inputstream.adap...nd-license
more likely you will need to find appropriate solution for various manifest/stream endpoints
what you want to do by mixing manifests data its a weird thing, so these are the only solutions
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#5
Yes, proxy was the option I considered  if there is no trick or native way for  loading a  source, fetch license and then load another source into inputstream.adaptive while maintaining the license in memory instead of restarting the process.
That's the general question: is it possible to load one file, (process it to fetch the key,) and then replace the video source  in memory or in the plugin with another source?
Reply
#6
no, what you want to do its an hack
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#7
Is such a hack possible using python scripting?
Reply
#8
No it would have to be done IA side. Because there is often different keys for audio/video and even different resolutions it would be a lot of effort to make a one size fits all, so in these cases it's better off doing the changes downstream in the addon via proxy, then you can tailor to fit your use case exactly.
Reply
#9
Altering every m3u8 that has an ext-x-key apple drm line with sample aes (non cenc) using a simple proxy worked surprisingly well.
This should be a feature of  inputstream Smile setting a custom (wv compatible)  ext-x-key with the pssh using the kid from the original line.
Another welcome feature maybe is a widevine data cache to reuse license_key data from previous sessions and skip the wv process.

Thanks for the inputs.
Reply
#10
im happy you have solved

every user would like to have customizations for its own special purpose,
but accept new customizations in the past led to several critical issues for the maintenance of this addon
so avoid customizations and keep an approach when possible in-line with the standards or however in-line with the most popular video players e.g. "shaka" (although ISA is not comparable with VPs of such a high level)

if an user has special needs you will have to use a proxy
and if a kind of feature is not supported but it is part of the specification of a protocol,
it will have to be implemented correctly without tricks or workarounds
this as info for future users who will read this thread
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#11
Is #KODIPROP:inputstream.adaptive.license_data still functional? I'm not sure how it works.
Reply
#12
read the wiki page
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
overriding license of m3u8 by license of mpd in kodi0