Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latency playing RTSP video  #11221

Copy link
Copy link
@stratosk

Description

@stratosk
Issue body actions

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:

override fun onPlaybackStateChanged(state: Int) {
                super.onPlaybackStateChanged(state)
                if (state == Player.STATE_READY) {
                    val bufferedPosition = exoPlayer.bufferedPosition
                    exoPlayer.seekTo(bufferedPosition)
                }
            }

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:

        val loadControl = DefaultLoadControl.Builder()
            .setBufferDurationsMs(
                400,
                3000,
                400,
                400
            )
            .build()
        val livePlaybackSpeedControl = DefaultLivePlaybackSpeedControl.Builder()
            .setFallbackMinPlaybackSpeed(0.5f)
            .setFallbackMaxPlaybackSpeed(1.5f)
            .build()

Is there anything I can do to minimize these 10 seconds delays?

Thanks in advance!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.