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

Player not run smoothly when gaps detected #7138

Open
vanminhquangtri opened this issue Aug 7, 2024 · 16 comments
Open

Player not run smoothly when gaps detected #7138

vanminhquangtri opened this issue Aug 7, 2024 · 16 comments
Assignees
Labels
component: HLS The issue involves Apple's HLS manifest format status: waiting on response Waiting on a response from the reporter(s) of the issue type: bug Something isn't working correctly
Milestone

Comments

@vanminhquangtri
Copy link

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

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

Yes

What version of Shaka Player are you using?

4.10.9 shaka UI
https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.10.6/shaka-player.ui.min.js

Can you reproduce the issue with our latest release version?
Yes
https://codesandbox.io/s/runtime-framework-8rvth7

https://shaka-player-demo.appspot.com/demo/#audiolang=en;textlang=en;uilang=en;asset=https://vips-livecdn.fptplay.net/MTA4NDUxNDB8Y25iY19obHMuc21pbHxmcHR8MTcyMjk5NDY5OXwxMDAuOTEuMTI1LjgxfDExNjMxZTdlMTM5MjQxYTFmMTc2ODE5ODJlOTFhYTYx/fnxhd2/cnbc_hls.smil/playlist.m3u8;panel=CUSTOM%20CONTENT;build=uncompiled

Can you reproduce the issue with the latest code from main?
Yes
https://codesandbox.io/s/runtime-framework-8rvth7

https://shaka-player-demo.appspot.com/demo/#audiolang=en;textlang=en;uilang=en;asset=https://vips-livecdn.fptplay.net/MTA4NDUxNDB8Y25iY19obHMuc21pbHxmcHR8MTcyMjk5NDY5OXwxMDAuOTEuMTI1LjgxfDExNjMxZTdlMTM5MjQxYTFmMTc2ODE5ODJlOTFhYTYx/fnxhd2/cnbc_hls.smil/playlist.m3u8;panel=CUSTOM%20CONTENT;build=uncompiled

Are you using the demo app or your own custom app?
Both.
This is demo codesandbox
https://codesandbox.io/s/runtime-framework-8rvth7

https://shaka-player-demo.appspot.com/demo/#audiolang=en;textlang=en;uilang=en;asset=https://vips-livecdn.fptplay.net/MTA4NDUxNDB8Y25iY19obHMuc21pbHxmcHR8MTcyMjk5NDY5OXwxMDAuOTEuMTI1LjgxfDExNjMxZTdlMTM5MjQxYTFmMTc2ODE5ODJlOTFhYTYx/fnxhd2/cnbc_hls.smil/playlist.m3u8;panel=CUSTOM%20CONTENT;build=uncompiled

If custom app, can you reproduce the issue using our demo app?
https://codesandbox.io/s/runtime-framework-8rvth7

https://shaka-player-demo.appspot.com/demo/#audiolang=en;textlang=en;uilang=en;asset=https://vips-livecdn.fptplay.net/MTA4NDUxNDB8Y25iY19obHMuc21pbHxmcHR8MTcyMjk5NDY5OXwxMDAuOTEuMTI1LjgxfDExNjMxZTdlMTM5MjQxYTFmMTc2ODE5ODJlOTFhYTYx/fnxhd2/cnbc_hls.smil/playlist.m3u8;panel=CUSTOM%20CONTENT;build=uncompiled

What browser and OS are you using?
Both window 11 Pro and macOS

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

What are the manifest and license server URIs?

Manifest:
https://vips-livecdn.fptplay.net/MTA4NDUxNDB8Y25iY19obHMuc21pbHxmcHR8MTcyMjk5NDY5OXwxMDAuOTEuMTI1LjgxfDExNjMxZTdlMTM5MjQxYTFmMTc2ODE5ODJlOTFhYTYx/fnxhd2/cnbc_hls.smil/playlist.m3u8

This is non-DRM

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

Please refer to the attached config.txt, it's long so can not paste here
config.txt

What did you do?

Init player as normal

What did you expect to happen?
Player run smoothly despite of gap

What actually happened?

Please periodically paused for a while then continue. This is because of streaming gap. I think there's would be some configuration but I can not find it.
BUT, with other player, like videojs, bitmovin, this not happen. Playback seem very smoothly, there's no pause
Videojs demo:
https://codesandbox.io/s/serene-cannon-rrr63f?file=/index.html

Bitmovin demo:
https://bitmovin.com/demos/stream-test/?format=hls&manifest=https%3A%2F%2Fvips-livecdn.fptplay.net%2FMTA4NDUxNDB8Y25iY19obHMuc21pbHxmcHR8MTcyMjk5NDY5OXwxMDAuOTEuMTI1LjgxfDExNjMxZTdlMTM5MjQxYTFmMTc2ODE5ODJlOTFhYTYx%2Ffnxhd2%2Fcnbc_hls.smil%2Fplaylist.m3u8

I think this is a feature of shaka player when it detect gap it will pause player for a while to wait for the missing content. But this make the watching not smoothly and somehow make it enjoyable for viewer.

Are you planning send a PR to fix it?
Sure, I will do if I can

@vanminhquangtri vanminhquangtri added the type: bug Something isn't working correctly label Aug 7, 2024
@shaka-bot shaka-bot added this to the v4.11 milestone Aug 7, 2024
@joeyparrish
Copy link
Member

Thank you for filing. I see in #7130 (comment) that you're having this issue in production, and it seems from the two issues that both 4.10.6 and 4.10.9 both have this issue.

The first thing I would recommend is trying older revisions (4.10.5, 4.10.4, ...) until you find one that does not have this issue.

There are several advantages of this:

  1. You can do this without waiting for us for a fix
  2. If successful, you can immediately fix your production service by rolling back Shaka
  3. If successful, it tells us a narrow range of revisions to search to identify the root cause and revert a problematic commit

Let us know how this goes!

@vanminhquangtri
Copy link
Author

Thanks @joeyparrish, we have just have to restart our CDN to temporarily fix this, in the next few days this issue will happen again.
The solution rolling back shaka version is not a safe choice because everytime we apply a new version of shaka, we have to implement testing process which takes about 1 - 1.5 month to make sure the version changing not affect our website, for example this feature, (get all resolutions) is not included in old version so we can not use old versions: #7008

After discussion this morning, we will wait for your fix for gap-jumping. It would be grateful if you can let me know your plan when this will be fixed. Thank you.

@joeyparrish
Copy link
Member

You should really do that testing in a staging environment. Nobody expects (or recommends) that you test an old version or a new version in production. That is definitely not safe. But testing in a staging environment is something you should really invest in, for the health of your business.

We (at Google) don't have a timeline for a fix, and this is not on my list any time soon. If you can back-test older versions in a non-production environment, it will really help accelerate a fix.

@vanminhquangtri
Copy link
Author

Hello @joeyparrish
Yes we can only revert to 4.9.16 is the oldest version because this version has this fix:
#7008

I also already tried version 4.0.2, the oldest version when we started using shaka and the issue of gap-jumping is still happen.
Thank you.

@joeyparrish
Copy link
Member

In email, I helped @vanminhquangtri work through 3.3.19 issues (missing mux.js). They determined that 3.3.19 works, but 4.0.0 does not. So that is the range that needs to be bisected. (Or 3.3.0 to 4.0.0, since 3.3.19 is from a branch.)

@vanminhquangtri
Copy link
Author

vanminhquangtri commented Aug 16, 2024

Thanks @joeyparrish , may I know if there will be a fix for this?
Currently I have re-start CDN everytime gap-jumping issue happen

@joeyparrish
Copy link
Member

We haven't found the root cause yet, so it's a little hard to say anything about a potential fix. You are more than welcome to help investigate if this is an urgent issue for you. That's part of the beauty of open source.

@joeyparrish
Copy link
Member

Also, I don't understand how a player bug would require you to restart a CDN. Can you elaborate on that? Perhaps there's some key information in that which could be helpful.

@vanminhquangtri
Copy link
Author

Hello @joeyparrish ,
Yes I am trying to find the cause directly inside your source code on github but still got no luck. I will try to best. I guess it is related to the firsTimeStart variable.
Regarding the re-start CDN, I have checked with my head-end team. They really don't know why the gap-jumping not happen after a re-start then happen again after a few days. Maybe this related to packager. But I don't think this is our issue because the videojs not have gap-jumping issue.
Thank you

@joeyparrish
Copy link
Member

Ah, I see. So it's not that the player breaks the CDN somehow, but that restarting the CDN/packager changes the stream in a way that no longer triggers the bug in the player. Is that accurate?

@vanminhquangtri
Copy link
Author

vanminhquangtri commented Aug 17, 2024

Hello @joeyparrish yes correct. Restart CDN help to prevent gaps happen in stream in a few days.

@vanminhquangtri
Copy link
Author

Hello @joeyparrish may I know if there's any going for this issue? A few days pass I tried to debug your sourcode but have no luck to find the problem.

@vanminhquangtri
Copy link
Author

Hello @joeyparrish do you have any update for this issue?

@avelad avelad modified the milestones: v4.11, v4.12 Sep 12, 2024
@vanminhquangtri
Copy link
Author

Hello @avelad may I know if @joeyparrish is not handled this anymore? Thanks

@avelad avelad modified the milestones: v4.12, v4.13 Nov 13, 2024
@avelad avelad added the component: HLS The issue involves Apple's HLS manifest format label Nov 14, 2024
@joeyparrish
Copy link
Member

Since this is specific to your CDN and application, I recommend you try bisecting the source range between the last working version and the first non-working version: 3.3.0 to 4.0.0.

Here are the general docs for git bisect: https://git-scm.com/docs/git-bisect

You want to do something like this:

git bisect start
git bisect bad v4.0.0
git bisect good v3.3.0

Then follow the prompts. At each revision, compile the player, test it in your app, then report back to git bisect with either git bisect good or git bisect bad. It will make you try about 8 revisions to determine the change that broke it.

If you can identify the player change responsible for the playback issue, we could help you understand the behavior and suggest a fix for you to test.

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: HLS The issue involves Apple's HLS manifest format status: waiting on response Waiting on a response from the reporter(s) of the issue type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants