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

Live dash not playing on shaka due to 20ms innacuracy time #7397

Closed
Iragne opened this issue Oct 4, 2024 · 1 comment · Fixed by #7405
Closed

Live dash not playing on shaka due to 20ms innacuracy time #7397

Iragne opened this issue Oct 4, 2024 · 1 comment · Fixed by #7405
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@Iragne
Copy link
Contributor

Iragne commented Oct 4, 2024

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?

Latest

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?
Yes

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

What browser and OS are you using?
FF and Chrome MAc

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

What are the manifest and license server URIs?

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

Default configuration

What did you do?

I play a live but the buffer associated to the live is full of hole.
This happen after the each manifest refresh

What did you expect to happen?
The playback to work and the video buffer to be fully filled without any hole into it

What actually happened?

The video buffer is full of hole after each manifest refresh.
Screenshot 2024-10-04 at 06 46 58
Each next segment (Reference) that should be added into the timeline is skipped due to inaccuracy of 20ms in the manifest.
here the code associated

// Append timeline
     let newEntries;
     if (currentTimeline.length) {
       const lastCurrentEntry = currentTimeline[currentTimeline.length - 1];
       newEntries = info.timeline.filter((entry) => {
         **return entry.start >= lastCurrentEntry.end;**
       });
     }

if we introduce an accuracy tolerance of few ms all is working fine and we are not removing the next segment for the timeline.

 // Append timeline
      let newEntries;
      if (currentTimeline.length) {
        const lastCurrentEntry = currentTimeline[currentTimeline.length - 1];
        newEntries = info.timeline.filter((entry) => {
          **return entry.start >= (lastCurrentEntry.end - 0.5);**
        });
      }

or this approach but not tested on my side

 // Append timeline
      let newEntries;
      if (currentTimeline.length) {
        const lastCurrentEntry = currentTimeline[currentTimeline.length - 1];
        newEntries = info.timeline.filter((entry) => {
          **return entry.end > lastCurrentEntry.end;**
        });
      }

event if it's working with that approach i'm not sure it's correct.
I also share the manifest format

Are you planning send a PR to fix it?
If you agree on the possible approach yes otherwise i'm happy to help you to reproduce
I have already a possible solution but i'm not sure it's correct and i would like to have your adivce
I don't want to make shaka break

SegmentTemplate of the manifest at the first download

<Representation id="1" width="1920" height="1080" sar="1:1" frameRate="50" bandwidth="4423000" codecs="avc1.64002a">
             <SegmentTemplate initialization="XXXXXX" media="XXXXX" timescale="1000"  startNumber="77">
                <SegmentTimeline>
                  <S t="346554266" d="2020"/>
                  <S d="2020"/>
                  <S d="2020"/>
                  <S d="2020"/>
                  <S d="2020"/>
                  <S d="2020"/>
                </SegmentTimeline>
             </SegmentTemplate>
           </Representation>


SegmentTemplate of the manifest at the second download

<Representation id="1" width="1920" height="1080" sar="1:1" frameRate="50" bandwidth="4423000" codecs="avc1.64002a">
              <SegmentTemplate initialization="XXXXXXX" media="XXXXX" timescale="1000"  startNumber="78">
                 <SegmentTimeline>
                   <S t="346556266" d="2020"/>
                   <S d="2020"/>
                   <S d="2020"/>
                   <S d="2020"/>
                   <S d="2020"/>
                   <S d="2020"/>
                 </SegmentTimeline>
@Iragne
Copy link
Contributor Author

Iragne commented Oct 8, 2024

I propose the following solution to address the live issue

@avelad avelad added priority: P2 Smaller impact or easy workaround component: DASH The issue involves the MPEG DASH manifest format labels Oct 9, 2024
avelad pushed a commit that referenced this issue Oct 18, 2024
…or first new segments (#7405)

fix(DASH): Live DASH allows segment overlap in the updated manifest for
first new segments to avoid creating GAP with ms inaccurate manifest vs
Segment duration and start time

Fixes #7397
avelad pushed a commit that referenced this issue Oct 18, 2024
…or first new segments (#7405)

fix(DASH): Live DASH allows segment overlap in the updated manifest for
first new segments to avoid creating GAP with ms inaccurate manifest vs
Segment duration and start time

Fixes #7397
joeyparrish pushed a commit that referenced this issue Oct 18, 2024
…or first new segments (#7405)

fix(DASH): Live DASH allows segment overlap in the updated manifest for
first new segments to avoid creating GAP with ms inaccurate manifest vs
Segment duration and start time

Fixes #7397
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Dec 14, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Dec 14, 2024
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: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
3 participants