xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
453 stars 242 forks source link

Aborting playback in the event of commercial breaks or X-discontinuity with the inputstream.adaptive addon #1507

Closed werimail closed 5 months ago

werimail commented 7 months ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is: Hi @CastagnaIT I noticed that the stream from DAZN Darts x PlutoTV simply stops after a certain time and you end up back in the Kodi main menu. It doesn't matter which Kodi version is used. According to the responsible developer @matthuisman , this is due to the lack of full support for ad breaks or X-discontinuity in the inputstream.adaptive addon. (https://github.com/matthuisman/slyguy.addons/issues/673#issuecomment-1987384548) For the same stream: https://pluto.tv/de/live-tv/64b67f0424ade50008a3be17, playback via browser works without any problems.

Expected Behavior

Here is a clear and concise description of what was expected to happen: The stream should run through without stopping after a certain time.

Actual Behavior

The stream from DAZN Darts x PlutoTV simply stops and ends up back in the Kodi main menu.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Start Kodi
  2. Play Stream: https://r.mjh.nz/PlutoTV/64b67f0424ade50008a3be17-alt.m3u8 with IPTV Simple Client (with activated option to use HLS streams via the inputstream.adaptive Addon under "Advanced")

Debuglog

The debuglog can be found here: https://github.com/matthuisman/slyguy.addons/files/14551853/kodi.log

MPD/M3U8s/ISM

An example or copy of a manifest (or manifests for HLS - master and variants) can be found here: https://r.mjh.nz/PlutoTV/64b67f0424ade50008a3be17-alt.m3u8

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

MajinLugia commented 10 hours ago

Unless I’m doing something wrong, I don’t see any difference in the streams with the workarounds or does iptvmerge ignore KODIPROP? @matthuisman

matthuisman commented 6 hours ago

IPTV merge should bring through the Kodi props. You can easily look at the output playlist to confirm....

MajinLugia commented 5 hours ago

IPTV merge should bring through the Kodi props. You can easily look at the output playlist to confirm....

That's where I'm not sure what is going on.

The output iptvmerge playlist simply shows this line for the Pokemon channel.

EXTINF:-1 group-title="Kids" tvg-chno="27" tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon

plugin://plugin.program.iptv.merge/?_=play_channel&slug=18.jjwF%2Fw

This is the line from the pluto tv playlist I added to iptvmerge.

EXTINF:-1 tvg-id="6675c7868768aa0008d7f1c7"tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png"tvg-chno="27"group-title="Kids",Pokémon

KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}

https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Feedback is appreciated.

matthuisman commented 5 hours ago

Pretty sure Kodi props have to he in correct order. Try it before extinf

On Fri, 25 Oct 2024, 06:43 MajinLugia, @.***> wrote:

IPTV merge should bring through the Kodi props. You can easily look at the output playlist to confirm....

That's where I'm not sure what is going on.

The output iptvmerge playlist simply shows this line for the Pokemon channel.

EXTINF:-1 group-title="Kids" tvg-chno="27"

tvg-id="6675c7868768aa0008d7f1c7" tvg-logo=" https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon plugin://plugin.program.iptv.merge/?_=play_channel&slug=18.jjwF%2Fw

This is the line from the pluto tv playlist I added to iptvmerge.

EXTINF:-1 tvg-id="6675c7868768aa0008d7f1c7"tvg-logo="

https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png"tvg-chno="27"group-title="Kids",Pokémon

KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}

https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Feedback is appreciated.

— Reply to this email directly, view it on GitHub https://github.com/xbmc/inputstream.adaptive/issues/1507#issuecomment-2435957629, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPQAKNIPYEFD4WG4VXHERDZ5EWT5AVCNFSM6AAAAABEQBC44CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZVHE2TONRSHE . You are receiving this because you were mentioned.Message ID: @.***>

matthuisman commented 5 hours ago

Oh wait. In IPTV merge turn off use merge proxy setting. When it uses that it adds Kodi props internally

On Fri, 25 Oct 2024, 06:43 MajinLugia, @.***> wrote:

IPTV merge should bring through the Kodi props. You can easily look at the output playlist to confirm....

That's where I'm not sure what is going on.

The output iptvmerge playlist simply shows this line for the Pokemon channel.

EXTINF:-1 group-title="Kids" tvg-chno="27"

tvg-id="6675c7868768aa0008d7f1c7" tvg-logo=" https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon plugin://plugin.program.iptv.merge/?_=play_channel&slug=18.jjwF%2Fw

This is the line from the pluto tv playlist I added to iptvmerge.

EXTINF:-1 tvg-id="6675c7868768aa0008d7f1c7"tvg-logo="

https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png"tvg-chno="27"group-title="Kids",Pokémon

KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}

https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Feedback is appreciated.

— Reply to this email directly, view it on GitHub https://github.com/xbmc/inputstream.adaptive/issues/1507#issuecomment-2435957629, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPQAKNIPYEFD4WG4VXHERDZ5EWT5AVCNFSM6AAAAABEQBC44CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZVHE2TONRSHE . You are receiving this because you were mentioned.Message ID: @.***>

MajinLugia commented 4 hours ago

Oh wait. In IPTV merge turn off use merge proxy setting. When it uses that it adds Kodi props internally On Fri, 25 Oct 2024, 06:43 MajinLugia, @.> wrote: IPTV merge should bring through the Kodi props. You can easily look at the output playlist to confirm.... That's where I'm not sure what is going on. The output iptvmerge playlist simply shows this line for the Pokemon channel. #EXTINF:-1 group-title="Kids" tvg-chno="27" tvg-id="6675c7868768aa0008d7f1c7" tvg-logo=" https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon plugin://plugin.program.iptv.merge/?_=play_channel&slug=18.jjwF%2Fw This is the line from the pluto tv playlist I added to iptvmerge. #EXTINF:-1 tvg-id="6675c7868768aa0008d7f1c7"tvg-logo=" https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png"tvg-chno="27"group-title="Kids",Pokémon #KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true} https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus Feedback is appreciated. — Reply to this email directly, view it on GitHub <#1507 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPQAKNIPYEFD4WG4VXHERDZ5EWT5AVCNFSM6AAAAABEQBC44CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZVHE2TONRSHE . You are receiving this because you were mentioned.Message ID: @.>

Not really sure if its my tv but when I turn off the proxy, it doesn't want to play some channels including Samsung channels. Weird. Appears to be an IPTV Simple problem after starting Kodi fresh....

matthuisman commented 3 hours ago

i tested with the below

#EXTINF:-1 tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" tvg-chno="27" group-title="Kids",Pokémon
#KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}
https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Without IPTV Merge proxy enabled, I got the output playlist as

#EXTM3U

#EXTGRP:

#EXTINF:-1 group-title="Kids" tvg-chno="27" tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon
#KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}
https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Which looks fine. With the IPTV Merge proxy I got

#EXTM3U

#EXTGRP:

#EXTINF:-1 group-title="Kids" tvg-chno="27" tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon
plugin://plugin.program.iptv.merge/?_=play_channel&slug=6.jjwF%2Fw

I then confirmed when I play that merge path, the kodi properties are still set as expected AddOnLog: inputstream.adaptive: Property found "inputstream.adaptive.manifest_config" value: {"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}

This is because IPTV Merge stores them and adds them itself when its called to play that channel slug

So I see no issue with IPTV Merge and Kodi properties

Also, if you dont have that Merge proxy enabled, you won't get the default user-agent I add which is not a Kodi user-agent. So, maybe thats why some channels don't play without it.. Not sure sorry

UPDATE: Yes, its the user-agent that is the issue. You can set user-agent to OKHTTP in IPTV Simple advanced settings You'll also need to enable Inputstream Adaptive for HLS in IPTV Simple advanced settings otherwise itll use ffmpeg (or can add the inputstreamaddon=inpustream.adaptive kodi property)

(IPTV Merge proxy does these automatically)

MajinLugia commented 3 hours ago

i tested with the below

#EXTINF:-1 tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" tvg-chno="27" group-title="Kids",Pokémon
#KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}
https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Without IPTV Merge proxy enabled, I got the output playlist as

#EXTM3U

#EXTGRP:

#EXTINF:-1 group-title="Kids" tvg-chno="27" tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon
#KODIPROP:inputstream.adaptive.manifest_config={"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}
https://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/6675c7868768aa0008d7f1c7/master.m3u8?deviceType=vizio-watchfreeplus&deviceMake=vizio&deviceModel=vizio&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&vizio_app_domain=%7BAPP_DOMAIN%7D&vizio_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=vizio-watchfreeplus

Which looks fine. With the IPTV Merge proxy I got

#EXTM3U

#EXTGRP:

#EXTINF:-1 group-title="Kids" tvg-chno="27" tvg-id="6675c7868768aa0008d7f1c7" tvg-logo="https://images.pluto.tv/channels/6675c7868768aa0008d7f1c7/colorLogoPNG.png" , Pokémon
plugin://plugin.program.iptv.merge/?_=play_channel&slug=6.jjwF%2Fw

I then confirmed when I play that merge path, the kodi properties are still set as expected AddOnLog: inputstream.adaptive: Property found "inputstream.adaptive.manifest_config" value: {"hls_ignore_endlist":true,"hls_fix_mediasequence":true,"hls_fix_discsequence":true}

This is because IPTV Merge stores them and adds them itself when its called to play that channel slug

So I see no issue with IPTV Merge and Kodi properties

Also, if you dont have that Merge proxy enabled, you won't get the default user-agent I add which is not a Kodi user-agent. So, maybe thats why some channels don't play without it.. Not sure sorry

Yeah this is an odd problem, I have opened an issue over at iptv simple and for some reason I see in the log that I get HTTP error 403 Forbidden, definitely didn’t happen months ago…. However since the Kodi Prop is indeed enabled with the proxy on then I guess the workarounds aren’t really effective. Always seem to be running into one problem after another, just my luck lol.

matthuisman commented 2 hours ago

See my update to my last comment :)

MajinLugia commented 2 hours ago

See my update to my last comment :)

I swear you are the best! Thank you so much for the help! Got it working now!