Skip to content
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

How to reduce glass to glass latency? #1180

Closed
renaudcerrato opened this issue Mar 13, 2024 · 1 comment
Closed

How to reduce glass to glass latency? #1180

renaudcerrato opened this issue Mar 13, 2024 · 1 comment
Assignees

Comments

@renaudcerrato
Copy link

renaudcerrato commented Mar 13, 2024

I'm receiving a raw H264 stream by TCP (with PTS informations) using a custom Extractor, feeding it to an H264Reader, and I'm looking to achieve the lowest latency. The stream is coming from the local network only, and I may be considering switching to UDP at some point if required.

For an evaluation purpose I've run both the streamer and the player on the same device (in 2 different process), the streamer actually streams the current screen. I'm using a zeroified load control:

val loadControl = DefaultLoadControl.Builder()
            .setBufferDurationsMs(0, 0, 0, 0)
            .setPrioritizeTimeOverSizeThresholds(true)
            .build()

I've put a running timer at the top of screen, and the best I can achieve is roughly 250ms(800x390@1Mbps) which sounds quite a lot:

image

Is there anything I could look at to improve the latency ? I'm sure there's a lot of room for improvements and I may be missing something.

Related to #1179

@tonihei
Copy link
Collaborator

tonihei commented Mar 14, 2024

As you say, this is more or less a duplicate of #1179, which I just converted to a feature request.

@tonihei tonihei closed this as completed Mar 14, 2024
@tonihei tonihei self-assigned this Mar 14, 2024
@androidx androidx locked and limited conversation to collaborators May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants