Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.9k stars 10.55k forks source link

Control without capture? #4566

Open keldian opened 9 months ago

keldian commented 9 months ago

Looked around a bit but couldn't find a clear answer. Standard use of scrcpy works great, but running scrcpy -N over TCP/IP I get:

INFO: No video playback, no recording, no V4L2 sink: video disabled
INFO: No audio playback, no recording: audio disabled
ERROR: No video, no audio, no OTG: nothing to do

A bit perplexed as I thought forwarding input (at least key events) qualifies as a "thing to do". Any other way to accomplish this?

rom1v commented 9 months ago

Over USB: scrcpy --otg

keldian commented 9 months ago

Thanks but as I pointed out, my use case is over TCP/IP.

rom1v commented 9 months ago

There is currently no solution for controlling the device without mirroring (maybe #4473 will help later).

One reason it is not easy to control without mirroring is that you need to see the screen to know where to click (absolute mode) in default injection mode. Only in HID mode you can have relative mouse events.

Another one is that SDL requires a window on the client side to capture the keyboard and the mouse.

keldian commented 9 months ago

Fair enough if there's no solution—I'll look into other software. To address those reasons, as I pointed out, key events would be enough; I don't need pointing input as the use case is to act as a basic TV remote. Also I don't mind a window being open as long as there's no video recording.