-
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
Latency playing RTSP video #11221
Comments
I don't advise that seekTo method call after onPlaybackStateChanged as that will cause buffering. ExoPlayer is not setup to play an RTSP stream as a live stream. You can adjust the DefaultLoadControl settings as you have done to lessen the amount of samples needed to buffer before playing. 10 seconds seems like a long time to start playing though. Do you know if you are using TCP or UDP with your rtsp source? If you are using UDP then that might be quicker with the less overhead. I could check if you were to send logs. To enable logging, use RtspMediaSource.Factory.setDebugLoggingEnabled(). |
@microkatz thanks for your response! I'm using UDP. I enabled the logs. Please find attached the section of the logcat until I see the video playing. |
@stratosk did you manage to solve the problem? I have the same problem as you. I need the stream to go almost without delay, low latency as possible. |
@SFocus no I didn't. I tried with VLC. I have again some seconds delay, but at least when it starts playing, there is < 1sec delay from the edge of the video. |
@stratosk thank you for your response. You can take a look at the GStreamer library. With it I have achieved a delay in milliseconds, but I have other problems somewhere there is a crash. |
Hi what type of problems are you encountering, checking if its worth going down that path. |
Hi @stratosk, sorry for the delay. I looked at your file but did not see any ExoPlayer logs as well. You'll need to make sure you also add the EventLogger as an Analytics Listener to your player. Here is some documentation on how to do that. https://developer.android.com/guide/topics/media/exoplayer/debug-logging. Also here are some directions about how to take a bug report. Please again update this bug when you have done so! Thank you! |
Hi @microkatz . No worries. Thank you for your response. Below the log after enabling the EventLogger. |
I'm using ExoPlayer for RTSP streaming video.
When I initially set the mediaSource and prepare the player, the video starts to play after ~10sec.
So, the video is already 10 sec behind the edge of the stream.
I use a listener like this:
in order to seek to the end of the stream once the video starts to play.
This cause a delay of another 10 seconds that the video freezes (due to buffering) but at the end the player almost is synced to the end of the stream.
I use this configuration for load control and livePlaybackSpeedControl:
Is there anything I can do to minimize these 10 seconds delays?
Thanks in advance!
The text was updated successfully, but these errors were encountered: