Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[K21] Live stream seeking stopped working after ISA 21.4.3 #1569

Closed
Trdum opened this issue Jun 1, 2024 · 6 comments · Fixed by #1586
Closed

[K21] Live stream seeking stopped working after ISA 21.4.3 #1569

Trdum opened this issue Jun 1, 2024 · 6 comments · Fixed by #1586
Labels
Resolution: Fixed issue was resolved by a code change

Comments

@Trdum
Copy link

Trdum commented Jun 1, 2024

[K21] Live stream seeking stopped working after ISA 21.4.3

Bug report

Describe the bug

Live stream seeking stopped working and live stream duration time is incorrect after ISA update 21.4.3.

Screenshots

Example screenshot:
LiveseekScreenshot

Expected Behavior

Working seeking in live streams and correct stream duration shown in progress bar.

Actual Behavior

Seeking in live stream is not working and stream duration is shown incorrectly. (See screenshot)

Possible Fix

See what has changed since ISA 21.4.3 and try to find what is wrong?

To Reproduce

The live streams seem to be limited/locked to my ip or hostname by my isp, so you sadly won't be able to open them if your isp does not match.

Debuglog, DASH and MPD

You can find debug logs, dash files and mpd files here:
https://github.com/trdum/cbcsinput

Your Environment

Tested operating systems:

  • Windows 11
  • Android 13
  • Linux Ubuntu

Tested Kodi versions:

  • Kodi 20.5 / InputAdaptive 20.3.18: Livestream seeking works
  • Kodi 21.0 / InputAdaptive 21.4.3: Livestream seeking works
  • Kodi 21.0 / InputAdaptive 21.4.4/21.4.9: Livestream seeking does not work
@Trdum Trdum added the Triage: Needed (managed by bot) issue that was just created and needs someone looking at it label Jun 1, 2024
@CastagnaIT
Copy link
Collaborator

from what i can see all mpd's provided have no timeshift buffer set:

<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mpeg:dash:schema:mpd:2011"
  xmlns:cenc="urn:mpeg:cenc:2013"
  xmlns:mspr="urn:microsoft:playready" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
  type="dynamic"
  availabilityStartTime="1970-01-01T00:00:00Z"
  publishTime="2024-01-19T13:40:44.905903Z"
  minimumUpdatePeriod="PT2S"
  maxSegmentDuration="PT2S"
  minBufferTime="PT10S"
  profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264">

the timeShiftBufferDepth is missing,
and also availabilityStartTime is not set,

you cant seek a stream that have no timeshift buffer
if this was working on older versions was only luck
where old segments was not yet removed on server
imo i dont see this as a bug

and so GUI timing iirc should be relative to segment timestamp

@CastagnaIT CastagnaIT added Resolution: By design behavior reported in the issue is actually correct and removed Triage: Needed (managed by bot) issue that was just created and needs someone looking at it labels Jun 2, 2024
@Trdum
Copy link
Author

Trdum commented Jun 2, 2024

Hello Stefano,

Hope you are doing well, thanks for looking into the issue.

When I open the live stream I can request the buffer/seekback duration of the live stream by adding an argument, for example adding '&time=120' to the mpd url will allow me to seekback 120 minutes which can be set upto 8 hours to seek back on the live stream.

ISA 24.4.3 used to be able to detect the seekback time exactly as I requested it from the stream but unfortunately this stopped working and was hoping with my limited knowledge this was considered a bug.

Would it be possible to add an option/property like 'auto_detect_timebuffer' that will fallback to the old 24.4.3 ways to detect the time if there is no buffer depth set in the mpd? for example with:
listitem.setProperty('inputstream.adaptive.auto_detect_timebuffer', 'true')

Kind regards.

@CastagnaIT CastagnaIT removed the Resolution: By design behavior reported in the issue is actually correct label Jun 2, 2024
@CastagnaIT
Copy link
Collaborator

mmh i hadn't looked closely at the timeline https://github.com/Trdum/cbcsinput/blob/main/mpd-nodrm.mpd
seem to be about 6h of segments?

      <SegmentTemplate timescale="600" initialization="tvid-$RepresentationID$.dash" media="tvid-$RepresentationID$-$Time$.dash">
        <SegmentTimeline>
          <S t="1023388556544" d="1152" r="12556" />
        </SegmentTimeline>
      </SegmentTemplate>

so ok there is no timeshift, but there are many segments,
and they cannot be seeked more likely due to missing duration
i will need to try give a look

@CastagnaIT CastagnaIT added the Triage: Needed (managed by bot) issue that was just created and needs someone looking at it label Jun 2, 2024
@Trdum
Copy link
Author

Trdum commented Jun 2, 2024

I just opened and compared mpds for 1 minute and 2, 4 and 6 hours seeking, hope this can be of any help.
Only the SegmentTemplate and publishTime changed between the different times, everything else stayed the same.

1 minute mpd:

<SegmentTemplate timescale="600" initialization="tvid-$RepresentationID$.dash" media="tvid-$RepresentationID$-$Time$.dash">
    <S t="1030402714752" d="1152" r="57" />

2 hour mpd:

<SegmentTemplate timescale="600" initialization="tvid-$RepresentationID$.dash" media="tvid-$RepresentationID$-$Time$.dash">
    <S t="1030397339520" d="1152" r="3781" />

4 hour mpd:

<SegmentTemplate timescale="600" initialization="tvid-$RepresentationID$.dash" media="tvid-$RepresentationID$-$Time$.dash">
    <S t="1030392973440" d="1152" r="7527" />

6 hour mpd:

<SegmentTemplate timescale="600" initialization="tvid-$RepresentationID$.dash" media="tvid-$RepresentationID$-$Time$.dash">
    <S t="1030388796288" d="1152" r="11277" />

@CastagnaIT
Copy link
Collaborator

i tried make a fix but i have no way to test it
you will find some test builds here:
https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1586/1/artifacts

@Trdum
Copy link
Author

Trdum commented Jun 24, 2024

Hello Stefano,

I just tried the test build and seeking is working again on live streams.

When I change the live stream seek time to 1 minute the player gui shows 1 minute and when changing the time to 8 hours the player gui shows 8 hours like I expect it to be.

Tested on Windows and Android by opening multiple live streams.

Thank you for fixing the issue and the support you give to this project!

Kind regards.

@CastagnaIT CastagnaIT added Resolution: Fixed issue was resolved by a code change and removed Triage: Needed (managed by bot) issue that was just created and needs someone looking at it labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Fixed issue was resolved by a code change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants