scrcpy
scrcpy copied to clipboard
[Question] Any way to use '--turn-screen-off' and '--stay-awake' options when using Server only?
Environment
- OS: Raspberry Pi OS Lite (Legacy)
- scrcpy version: 1.24
- installation method: manual build
- device model: OnePlus 3
- Android version: 11 (crDroid 7.19)
Describe the bug
I am using scrcpy on my Raspberry Pi to mirror my phone screen using this script :
#!/bin/bash
adb push /usr/local/share/scrcpy/scrcpy-server /data/local/tmp/scrcpy-server.jar
adb forward tcp:1234 localabstract:scrcpy
adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process / com.genymobile.scrcpy.Server 1.24 raw_video_stream=true tunnel_forward=true control=false &
omxplayer --no-keys --no-osd --fps 60 --advanced=0 --loop --timeout 0 --lavfdopts probesize:250000 --video_queue 1 --avdict rtsp_transport:tcp tcp://localhost:1234 &
exit 0
Is there a way to use the '--turn-screen-off' and '--stay-awake' options in this case? My phone display is broken and is causing lags if these options are not used.
--turn-screen-off, possible but not straightforward: a control event is sent from the client on the control socket (source)
I'm sorry but I don't understand. How do I send this control event in my script?