A month ago I forked the above mentioned module from another dev that deleted almost all of his repositories, so I decided to keep maintaining it by regularly pulling from upstream repository.
So what is streamlink? Streamlink is a fork livestream in which development unfortunately seems to be dormant.
Many devs have improved it, bug fixed it and made new plugins for it.
It mainly serves PC based systems passing resolved urls into desktop programs and play them, but main source code is written in Python, which is very convenient for us.
Primarily it resolves live streams, but there are plugins that can do videos on demand playback.
So how to utilize it? Simply add this to your imports into addon.xml:
Then you can add this example code somewhere in one your python modules:
Note: commented lines provide debugging, uncomment them to have DEBUG messages.
Sources:
Upstream repository: https://github.com/streamlink/streamlink
Downstream packed for Kodi: https://github.com/Twilight0/script.modu...mlink.base
Repository for updates:
https://github.com/Twilight0/repo.twilig...ight0.libs
Additionally...
You can load custom plugins!
You can install optional addon which resolves streams in iptv simple client:
(Thank you beardypig)
Repository: https://github.com/Twilight0/service.streamlink.proxy
Support thread: https://forum.kodi.tv/showthread.php?tid=320011
So what is streamlink? Streamlink is a fork livestream in which development unfortunately seems to be dormant.
Many devs have improved it, bug fixed it and made new plugins for it.
It mainly serves PC based systems passing resolved urls into desktop programs and play them, but main source code is written in Python, which is very convenient for us.
Primarily it resolves live streams, but there are plugins that can do videos on demand playback.
So how to utilize it? Simply add this to your imports into addon.xml:
Code:
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.streamlink.base" version="2017.09.06"/>
</requires>
Then you can add this example code somewhere in one your python modules:
Code:
import streamlink.session
# import sys
def resolve(url, quality='best'):
try:
session = streamlink.session.Streamlink()
# session.set_loglevel("debug")
# session.set_logoutput(sys.stdout)
plugin = session.resolve_url(url)
streams = plugin.get_streams()
stream = repr(streams[quality])
link = stream.partition('(\'')[2][:-3]
return link
except:
pass
Note: commented lines provide debugging, uncomment them to have DEBUG messages.
Sources:
Upstream repository: https://github.com/streamlink/streamlink
Downstream packed for Kodi: https://github.com/Twilight0/script.modu...mlink.base
Repository for updates:
https://github.com/Twilight0/repo.twilig...ight0.libs
Additionally...
You can load custom plugins!
Code:
session.load_plugins(/path/to/custom/plugins)
You can install optional addon which resolves streams in iptv simple client:
(Thank you beardypig)
Repository: https://github.com/Twilight0/service.streamlink.proxy
Support thread: https://forum.kodi.tv/showthread.php?tid=320011