You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stack Overflow, GitHub, and source code/documentation. We have some custom-built ExoPlayer components, so it's been hard to even know what I'm looking for.
[REQUIRED] Question
I had asked a previous question about a custom implementation for raw NAL units. We were able to get that working well enough with a custom Extractor, ElementaryStreamReader, and BaseDataSource. We have now circled back around to it to improve performance and there are 2 main issues:
Our stream, coming from the same source, is out of sync between Android and the web. Sometimes it is a bit ahead, and sometimes it is far behind.
The stream is a low-latency live feed. After buffering it continues from the last frame before the buffering started, causing the feed to slowly have more and more latency.
The question is, what approach can we use to ensure the playback is always playing the latest frames? It doesn't matter to us if frames are skipped/discarded, as this feed is live. I've looked into Extractor.RESULT_SEEK as well as LoadControl but I'm not sure if that is even the right place to start. Thank you.
The text was updated successfully, but these errors were encountered:
Hi @TroyStopera, I'm working in a project with the same characteristics as yours.
I noticed the same issue as you and what I've done is:
Subscribe to the player EventListener
Detect the events related with buffering and recovering
Remove old packets and perform a seekToDefaultPosition(). This seeks your playback as close as possible to the live edge.
For me it's not the perfect solution, sometimes playback is really far behind the same stream in iOS, but it seems to recover after buffering. At least is playing in the live edge.
The main options you have available are seeking to the live edge with player.seekTo(player.getDuration()) whenever buffering occurs or speeding up playback a bit (player.setPlaybackParameters(...)) so that playback can catch up with the live edge. To reduce general rebuffer delay, you can also try to set the bufferForPlaybackAfterRebufferMs value of the DefaultLoadControl to zero, so that the player resumes playback as soon as it has any samples to play. See also #4217 for a similar issue.
Note that we are also looking into better out-of-the-box support for low-latency streaming soon. There are #5011 and #4904 to track that.
[REQUIRED] Searched documentation and issues
Stack Overflow, GitHub, and source code/documentation. We have some custom-built ExoPlayer components, so it's been hard to even know what I'm looking for.
[REQUIRED] Question
I had asked a previous question about a custom implementation for raw NAL units. We were able to get that working well enough with a custom
Extractor
,ElementaryStreamReader
, andBaseDataSource
. We have now circled back around to it to improve performance and there are 2 main issues:The question is, what approach can we use to ensure the playback is always playing the latest frames? It doesn't matter to us if frames are skipped/discarded, as this feed is live. I've looked into
Extractor.RESULT_SEEK
as well asLoadControl
but I'm not sure if that is even the right place to start. Thank you.The text was updated successfully, but these errors were encountered: