Closed joachimBurket closed 2 years ago
I tried reading the shows using the Inputstream Adaptive player, and the crash don't appear with it:
def play_episode(urn, channel, showid):
"""
this method plays the selected episode
"""
besturl = _parse_integrationplayer_2(urn)
# add authentication token for akamaihd
if "akamaihd" in urlparse(besturl).netloc:
url = "http://tp.srgssr.ch/akahd/token?acl=" + urlparse(besturl).path
response = json.load(_open_url(url))
token = response["token"]["authparams"]
besturl = besturl + '?' + token
listitem = xbmcgui.ListItem(path=besturl)
listitem.setContentLookup(False)
listitem.setMimeType("application/vnd.apple.mpegurl")
listitem.setProperty("inputstream", "inputstream.adaptive")
listitem.setProperty("inputstream.adaptive.manifest_type", "hls")
listitem.setProperty("isPlayable", "true")
_addSubtitles(listitem, channel, showid)
xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
I don't know if using the InputStream Adaptive can be considered?
hi @joachimBurket, Thanks for the feedback and I will further investigate. I quickly tried 20+ different streams from RTS on my Win10 & Android setup with Kodi 19.4 and I have not experienced any issues.
The adaptive Inputstream might be a working solution: https://github.com/xbmc/inputstream.adaptive/wiki/Integration.
As I can see we have all the information: https://il.srgssr.ch/integrationlayer/2.0/mediaComposition/byUrn/urn:rts:video:12998907.json
listitem = xbmcgui.ListItem(path=besturl)
listitem.setContentLookup(False)
listitem.setMimeType("application/x-mpegURL")
listitem.setProperty("inputstream", "inputstream.adaptive")
listitem.setProperty("inputstream.adaptive.manifest_type", "hls")
listitem.setProperty("isPlayable", "true")
_addSubtitles(listitem, channel, showid)
Wow, I didn't expect an answer so soon, thanks!
What is the Kodi version and on which operating system is Kodi currently running?
I tried in two places:
Could you provide me with the RTS TV show names you experienced this behavior?
The error occurs on every shows (I just re-tried with "52 minutes" or the "19h30").
As for the inputstream adaptive, there is a helper (https://github.com/emilsvennesson/script.module.inputstreamhelper) that is useful to check if it is available on the OS and which kodi version is running. I made a pull request #10 using it.
Funny, every add-on error that has been reported so far was on a Linux os π― (sometimes I wonder if most of our users just use Linux :) π
Anyway thanks for the PR I'm gonna test it and create a release branch as we do not allow code changes on the master before it is released in the official Kodi repository.
Hahah Linux for life :heart_eyes: :stuck_out_tongue_winking_eye:
But with C++ and Python, I'm already amazed that kodi works on multiple platforms without dying too often :sweat_smile:
Again thanks for your work! :)
@joachimBurket have a look at https://github.com/ManBehindMooN/kodi_plugin_video_srgssr_ch_replay/blob/feature/3.0.4/plugin.video.srgssr_ch_replay/addon.py
I changed the code a bit in order to make it more generic and our add-on cannot be played lower than Kodi 19 (matrix) therefore I removed those checks.
In general the Inputstream Adaptive seems to work but I'm quite unhappy that the initial 1080p or 720p stream is massively scaled down to 960x540.
The Inputstream Adaptive configuration can be enabled. I guess it is a good compromise for those users who don't need it.
Hm strange, I haven't a very good understanding of the inputstream adaptive for now.
A setting could be added in this addon to activate it (default to false), and checked in the _set_inputstream_params()
method
@joachimBurket I added such a setting on the branch. Have a look at it if it works for you. I don't understand why all the full HD streams are at a maximum of 960x540. Maybe it is scaling up after a while. The streams I tested I got the feeling that the quality is worse with the adaptive inputstream. Just test it for a while if you are happy then I will release a new version. Let me know.
SGTM.
I'll try to check the quality I'm getting in the next weeks.
@joachimBurket I found a workaround for the low resolution. I changed the InputStream Adaptive default settings: Now I can manually select the resolutions. The thing that surprised me the most was when I switched it back to the default settings (automatic stream selection) then the full HD stream was selected. Do you have a similar behavior?
Well done! I tested it and also had this behavior, but couldn't find any logic behind it.
This issue is going to be solved with the upcoming version 3.0.4 (https://github.com/ManBehindMooN/kodi_plugin_video_srgssr_ch_replay/tree/feature/3.0.4).
@meierfra & @joachimBurket:
Latest in two weeks I'm going to create a pull request for the official Kodi repository π
@joachimBurket Have a look at: https://github.com/ManBehindMooN/kodi_plugin_video_srgssr_ch_replay/commit/f806db8d675d96ffc9b77ca5428c2741c5dbb1c2 (there was a missing part in the french translation... any feedback)?
https://github.com/ManBehindMooN/kodi_plugin_video_srgssr_ch_replay/commit/55978cdf514ea2ffea9e26389bcf8be05f781efc => you have been specially mentioned in the new version β€οΈβπ₯
Oups forgot this one π I added some comments on the commits ;)
Also thanks for the mention π
Oups forgot this one π I added some comments on the commits ;)
no worries π
Also thanks for the mention π
Welcome!!!
Hi,
I experience player crash for some time when trying to seek in the RTS shows I tried with some SRF shows and it doesn't seems appears on it.
Here is a debug log of the player crash:
Has anyone experienced a similar issue ?