Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
111.56k stars 10.69k forks source link

it there any way that I can reduce latency? #622

Closed Ciel-MC closed 5 years ago

Ciel-MC commented 5 years ago

can I sacrifice video quality to trade lower latency? Simular to https://github.com/Genymobile/scrcpy/issues/77

rom1v commented 5 years ago

Try reducing the definition and the bitrate:

scrcpy -m800 -b2M
Ciel-MC commented 5 years ago

do I need to change the number?

Ciel-MC commented 5 years ago

and just asking, how do you make livings out of this thing

Ciel-MC commented 5 years ago

and it don't make a difference for me

rom1v commented 5 years ago

do I need to change the number?

-m/--max-size is the maximum width and height. Use the size you want. -b/--bit-rate is… the bitrate. Default is 8 Mbps. Use the value you want too.

and just asking, how do you make livings out of this thing

I was an employee at Genymobile when I developed the first version. Now I develop it on my free time, totally volunteer.

But don't worry for me, I am paid as a Videolabs employee to work on other cool open source projects (VLC) :wink:

and it don't make a difference for me

Then you won't get a better latency. Is it over USB? How much latency do you have? It should not be more than 100ms (and probably lower).

Ciel-MC commented 5 years ago

indirect advertisement XD and my phone is 4k but when I reduce it to 800*something, the latency is like 0.001% better

Ciel-MC commented 5 years ago

and if I set bitrate higher than 8m, will the quality be better?

rom1v commented 5 years ago

and if I set bitrate higher than 8m, will the quality be better?

It's encoder-dependant. In practice, 12m or 16m can increase, beyond has no effect.

Ciel-MC commented 5 years ago

ok

Ciel-MC commented 5 years ago

also, are you planning on making keybinding? like those emulators when you press a key it presses a certain place on the screen

Edit:And yes, I am using USB

rom1v commented 5 years ago

No, I am not planning that.

Ciel-MC commented 5 years ago

ok thx

jfmaradiaga commented 4 years ago

Try reducing the definition and the bitrate:

scrcpy -m800 -b2M

Thank you very much, this solved my problem.

wiiznokes commented 1 week ago

You can also limit fps. I was able to reduce latency + upgrade the resolution by limiting the framerate in my game. You can use the --print-fps to have an idea for the value, and you can also use --max-fps=30. Also, using the codec h264 is probably better than av1 or h265.