How to achieve as low-latency as possible with ExoPlayer rtsp
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm wondering what the best way to achieve as low-latency as possible is regardless of quality. Currently, I'm trying to play a stream over RTSP but seem to be getting around a second or more of delay. My current ~rough~ setup looks like
```
DefaultLoadControl dlc = new DefaultLoadControl.Builder().setBufferDurationsMs(100, 100, 100, 100).build();
exoPlayer = new ExoPlayer.Builder(this).setMediaSourceFactory(new DefaultMediaSourceFactory(this).setLiveTargetOffsetMs(0)).setLoadControl(dlc).build();
RtspMediaSource ms = new RtspMediaSource.Factory().createMediaSource(MediaItem.fromUri(videoURL));
exoPlayer.setMediaSource(ms);
```
I'm setting a load control with pretty low buffers (100ms) and an ExoPlayer with live target offset of 0ms. Am I doing something wrong or missing something? Or is this just the best performance I can expect? I'm getting some lower latency with some less-optimal, but functional alternative libraries.
Any help would be much appreciated! Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.