HLS video stream Kodi 17
#1
This video work on Kodi 16 but not on kodi 17 and not also on last nightly kodi18 (win64)

http://www.la7.it/dirette-tv

do you have some idea ? i tring to solve it for La7-La7d plugin
https://github.com/luivit/plugin.video.rivedila7
Reply
#2
Looks like a bug in ffmpeg as the request is invalid/truncated for the sub-playlist. Request is made to:

http://la7livehls-lh.akamaihd.net/i/live...&rebase=on

instead of: http://la7livehls-lh.akamaihd.net/i/live...8d0cb4c582

Might be a good idea to submit an issue to http://trac.ffmpeg.org.

Note that some code to handle hls was removed from Kodi so that might be the reason for it to work in v16 but not v17. As of now inputstream.adaptive handles hls much better than ffmpeg, so you might want to use it instead of the default.

Strm below plays fine in kodi 18 (while the cookie does not expire):

Code:
#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=hls
http://la7livehls-lh.akamaihd.net/i/live...b26137e55b

In your addon you can use it like below:

python:
liz = xbmcgui.ListItem("your file")
liz.setProperty('inputstreamaddon','inputstream.adaptive')
liz.setProperty('inputstream.adaptive.manifest_type','hls')
liz.setPath("http://la7livehls-lh.akamaihd.net/i/livebkup_1@372883/master.m3u8?hdnts=st=1533742622~exp=1533743072~acl=/*~hmac=932b6261086d137453b01456bd94ca40783c7676a68c656948d8e0b26137e55b")
xbmcplugin.setResolvedUrl....

PS: You need to enable inputstream.adaptive addon to use it (by default it is not enabled).
Reply
#3
Yep, thanks.
It work.

Tomortow i will open an ffmpeg issue.

Thanks a lot
Reply
#4
is it possible enable InputStream Adaptive automatically by our plugin ?
So the user should not enable it manually.

I tried by:
Code:
<import addon="inputstream.adaptive" version="2.0.20"/>
but it do not work, in the log there is:
Code:
ERROR: CAddonInstallJob[plugin.video.rivedila7]: The dependency on inputstream.adaptive version 2.0.20 could not be satisfied.
Reply
#5
Yes importing the addon in addon.xml just creates a dependency but will not enable the addon (although it is good to keep it as a dependency so users receive a warning when attempting to remove the inputstream addon). You can use the JSON-RPC API to enable the addon on the fly, before creating the listitem. You have an example below using python's contextmanager:

python:
import json
from contextlib import contextmanager
import xbmc

@contextmanager
def enabled_addon(addon):
    data = json.loads(xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Addons.GetAddonDetails","params":{"addonid":"'+addon+'","properties":["enabled","installed"]},"id":5}'))
    if "result" in data:
        xbmc.log("Addon is installed. Enabling if disabled.")
        if not data["result"]["addon"]["enabled"]:
            result_enabled = xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","params":{"addonid":"'+addon+'","enabled":true},"id":9}')
    else:
        xbmc.log("Addon not installed. Prompt an error to the user.")
    yield

def run():
    with enabled_addon("inputstream.adaptive"):
        # Do your stuff
Reply
#6
if i leave it as dependency in addon.xml it is not possible install the plugin because I always receive the message 
Code:
The dependency on inputstream.adaptive on version x.x.x could not be satisfied

I removed the dependencies and entered your sample code directly in addon.py

It work, thanks
Reply
#7
What if you add only inputstream.adaptive in addon.xml without requiring a specific version?

Code:
<import addon="inputstream.adaptive"/>
Reply
#8
yep, it work, 
now inputstream.adaptive is automatically installed and enabled :-)
(at least on Win10)
Reply

Logout Mark Read Team Forum Stats Members Help
HLS video stream Kodi 170