-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Buffer configuration for live streams #2438
Comments
Dear @petitTrung: I think the problem is similar to #2083; please refer to the logics below.
There are four parameters within DefaultLoadControl; two of them control the load timing; the other twos control when the playback starts by having sufficient buffering. Please refer to the figure below. Refer to shouldContinueLoading(), a typical loading pattern includes 3 stages. Since then isBuffering = false and bufferTimeState == BETWEEN_WATERMARKS; so shouldContinueLoading() returns false as below. Finally, when bufferTimeState == BELOW_LOW_WATERMARK again we recover the download, as the figure below. Per the flow described, you could see within the period of [t1, t3] actually we DO NOT load anymore. Therefore you may meet the condition, for example to have merely ~ 15 seconds buffering. Beside, there is a limit upon buffering size. You have two choices to enlarge it.
Finally, if it is a LIVE streaming. you are still limited by current available data at source. |
For radio or any other live stream, depending on the exact type of the stream, it might not be possible to build up a large buffer in a sensible way. For example if the stream/server only allows you to request the past 5s of the stream, then the only way a player could build up a 30s buffer would be for it to sit around buffering for 25s after opening the connection, prior to starting playback. That wouldn't be a good user experience. Note also that the larger the buffer, the further behind "live" the user will be. I suspect in your case the stream/server is effectively controlling the buffer size to something around 5s, by only making that duration of past media available. In which case changes you make in the player probably wont have any effect. |
Thank both of you @WeiChungChang & @ojw28 for your help ! |
Hello,
I've encountered an buffering issue with ExoPlayer 2 :
Actually, i have 5s of buffers, I did increase these parameters by 3x, 4x, 5x, .... together or separately but i found no way to achieve the initial goal 30s. Could you explain in detail how we can control Buffering time, please ?
Thanks in advance
The text was updated successfully, but these errors were encountered: