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

Seeking not working as expected on certain multi period DASH streams in 4.4.x #5664

Closed
littlespex opened this issue Sep 15, 2023 · 5 comments · Fixed by #5716 or #5727
Closed

Seeking not working as expected on certain multi period DASH streams in 4.4.x #5664

littlespex opened this issue Sep 15, 2023 · 5 comments · Fixed by #5716 or #5727
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@littlespex
Copy link
Collaborator

littlespex commented Sep 15, 2023

Have you read the FAQ and checked for duplicate open issues?
Yes

If the problem is related to FairPlay, have you read the tutorial?

N/A

What version of Shaka Player are you using?

4.4.2. This issue does not occur in 4.3.12.

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Both

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Chrome 117.0.5938.62, Safari 16.6 (18615.3.12.11.2), MacOS Ventura 13.5.2 (22G91)

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A

What are the manifest and license server URIs?

Sent via email

What configuration are you using? What is the output of player.getConfiguration()?

Default

What did you do?

  1. Load the stream
  2. Once playback begins, seek somewhere in the middle of the stream (most noticeable when seeking to a different period)

What did you expect to happen?
The player jumps to the new playhead time, starts loading segments starting at the new playhead time and begins playback.

What actually happened?

The player loads all segments between the original playhead time and the seek time resulting in a long "buffering" period before playback resumes.

seek_issue_4.4.x.mp4
@littlespex littlespex added the type: bug Something isn't working correctly label Sep 15, 2023
@littlespex littlespex changed the title Seeking broken on certain multi period DASH streams in 4.4.x Seeking regression on certain multi period DASH streams in 4.4.x Sep 15, 2023
@littlespex littlespex changed the title Seeking regression on certain multi period DASH streams in 4.4.x Seeking not working as expected on certain multi period DASH streams in 4.4.x Sep 15, 2023
@shaka-bot shaka-bot added this to the v4.5 milestone Sep 16, 2023
@avelad avelad added the component: DASH The issue involves the MPEG DASH manifest format label Sep 16, 2023
@avelad
Copy link
Collaborator

avelad commented Sep 27, 2023

@littlespex are you interested on send a PR to fix it?

@littlespex
Copy link
Collaborator Author

We are still trying to find the root cause of the issue. Any thoughts?

@littlespex
Copy link
Collaborator Author

littlespex commented Sep 27, 2023

Update: The issue was introduced in commit f1c5a1c

@joeyparrish Any thoughts as to why this change would result in the player loading all segments between the current playhead time and the seek time?

@littlespex
Copy link
Collaborator Author

The segment iterator is not returning the correct initial value, and the update_ function has to tick through all the interim values before finding the correct segment. Adding the following code at the end of StreamingEngine's getSegmentReferenceNeeded_ function fixes the issue, but seems dangerous:

      while (mediaState.segmentIterator && presentationTime > ref.endTime) {
        ref = mediaState.segmentIterator.next().value;
      }

@koenoe
Copy link
Contributor

koenoe commented Oct 28, 2023

This issue is still happening for us, we don't have it in 4.3.x, but we do in 4.4.x and 4.5.x

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Dec 3, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Dec 3, 2023
gkatsev pushed a commit to sky-hugolima/shaka-player-contrib that referenced this issue Dec 6, 2023
…t#306)

* [PATCH] fix(dash): fix race condition in segment template (shaka-project#5842)

Fixes shaka-project#5760

* fix(cea): Fix not rendering CEA-608 Closed Captions (shaka-project#4683)

Also added H265 support and a framework for future TS CEA parser support.

Fixes shaka-project#4605
Fixes shaka-project#3659

Co-authored-by: Joey Parrish <joeyparrish@google.com>

* fix(cea): Fix not rendering CEA-608 on encrypted mp4 segments (shaka-project#4756)

Fixes shaka-project#4605

Co-authored-by: Joey Parrish <joeyparrish@google.com>

* fix: CEA 608 captions not work with H.265 video streams (shaka-project#5252)

Fix parsing of CEA 608 captions in H.265 video streams by handling 2
byte nal unit header.

Fixes shaka-project#5251

* fix: seeking in segment timeline returns incorrect index (shaka-project#5716)

Resolves shaka-project#5664

---------

Co-authored-by: Albin Larsson <albin.larsson@eyevinn.se>
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Co-authored-by: Joey Parrish <joeyparrish@google.com>
Co-authored-by: Aidan Ridley <aidan.ridley@charter.corp-partner.google.com>
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
4 participants