-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Playback Stalls For Few Seconds When Playback Initiated #1666
Comments
i had a similar issue, maybe it is not the same case but i had the |
I'm getting HTTP 504 errors from your server. Each one takes fully 30 seconds. Could it be that the hang is caused by an overwhelmed server, load-balancer, or CDN? Here's a screenshot: Please try again and use the network panel in your browser to monitor the server's response codes and response times. If this server issue is resolved and you still have playback problems, please let us know and we can look again. |
@joeyparrish I'm getting the same (504) response now, but it wasn't this way when I submitted it. Let me reach out to the customer to see what's going on. |
Okay. I'll put it back in the triage queue for whoever is on duty after me. |
With the new URL, I can't see anything obviously wrong. The times below are measured from my very fast workstation on my very fast internet connection, so they may vary and could be much longer for others. I'm seeing a load latency of about 2-3 seconds as measured by Shaka Player. You can measure this state yourself by turning setting the log level to "Debug" in the demo app UI under "configuration" and observing the JS console. Load latency here is the time from the Is this the state which you are calling a stall? From that point until we exit the buffering state is about 2-3 seconds more for me. This includes fetching additional media segments to meet the buffering goals expressed in the manifest and the player configuration. The manifest has a If it's this initial buffering which takes too long for you, you should reduce the If you can't control the content, you can override // DASH minBufferTime will have no effect if we set this field before loading:
player.configure('manifest.dash.ignoreMinBufferTime', true);
// We can now control initial buffering purely through this field:
player.configure('streaming.rebufferingGoal', 2 /* seconds */); Does this help? |
@joeyparrish Yeah, that sounds like the point in which it looks like our player is stalling, because we're not displaying the buffer spinner. However, I'm confused why the playback of the stream below starts right away for us in our player: https://wowzaec2demo.streamlock.net/live/bigbuckbunny/manifest_mpm4sav_mvtime.mpd It also has a |
There are three major, meaningful differences between those two pieces of content that greatly influence startup latency: presentation delay, segment size, and bitrate. Presentation delayThe stream which isn't stalling has a player.configure('manifest.dash.defaultPresentationDelay', 20); (If the default presentation delay is less than The presentation delay is very important. It influences how far ahead the Player can buffer at the live edge, which then indirectly influences how quickly we can reach the The live edge on the server side is the start of the latest segment that has been written to the CDN. The live edge for the Player is the start of the latest segment in the manifest minus the presentation delay. We will start playback at that point, but we can buffer ahead of that up until the the latest segment in the manifest. So if presentation delay is 20 seconds, we can fetch up to 20 seconds of content ahead of what is presented to the user. Segment sizeWhen you factor in segment size, you get another major difference: the stream that works better has larger segments (10 seconds vs 2 seconds). So you need fewer of them to start playback. Let's show these startup factors in a table. For the working stream:
So as soon as you have 1 video and 1 audio segment, you can start playback. Vs in the delayed stream:
Here you need to have 3 video and 3 audio segments to start playback. You have the additional connection latency of 6 fetches vs 2 and the additional overhead in bandwidth of 6 MP4 structures instead of 2. BitrateIf you look at the bitrate requirements of the two streams, you'll see the final important difference. The stream which works better only has one bitrate available: 600kbit video + 96kbit audio. The other stream has 4 video streams (250kbit, 600kbit, 1200kbit, and 2100kbit) + 64kbit audio. So one final table:
So if your internet connection is fast, the bad stream might be fetching twice as many bytes over three times as many individual requests to start playback. |
@waxidiotic Does this answer all your questions? Can we close the issue? |
This is amazing @joeyparrish. Thank you so much. I'll relay this to the customer. |
Happy to help. Should we leave the issue open for a few more days? |
@joeyparrish Nah, I think we're good. |
Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?:
Can you reproduce the issue with our latest release version?:
Yes
Can you reproduce the issue with the latest code from
master
?:Yes
Are you using the demo app or your own custom app?:
Reproduced with both
If custom app, can you reproduce the issue using our demo app?:
n/a
What browser and OS are you using?:
What are the manifest and license server URIs?:
What did you do?
What did you expect to happen?
What actually happened?
The text was updated successfully, but these errors were encountered: