Usage:
If you use Android phone as the server and PC as client,
- adb forward tcp:8000 localabstract:localSver
- Uncomment val thread = ServerThreadConnect() at MainActivity
- Run app server
- Run java PCClient
Alternatively, you can use your PC as server and Android phone as client,
- adb reverse localabstract:scrcpy tcp:8000
- Run java PCServer. To display video frames, you can also run a ffplay server by the following command: ffplay -f h264 -codec:v h264 tcp://127.0.0.1:8000?listen
- Uncomment val thread = ClientThreadConnect()
- Run app client
To decrease ffplay latency,
ffplay -fflags nobuffer -fflags discardcorrupt -flags low_delay -framedrop
-codec:v h264 tcp://127.0.0.1:8000?listen