Build Instructions
The official build instructions on the official website are too convaluted so putting the details in simple words here
Official build instructions are https://github.com/Genymobile/scrcpy/blob/master/BUILD.md
- I am using ubuntu 18.04 based Ubuntu Mate 18.04 for my system
-
Install dependencies
sudo apt install ffmpeg libsdl2-2.0-0
sudo apt install gcc git pkg-config meson ninja-build \
libavcodec-dev libavformat-dev libavutil-dev \
libsdl2-dev
- lets start the process
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
We will cut short the process by using the pre-build server
- Download the prebuild server
curl -s https://github.com/Genymobile/scrcpy/releases/download/v1.10/scrcpy-server-v1.10.jar -O scrcpy-server.jar
- Lets start the setup process: prepare the build
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=./scrcpy-server.jar
- Build command
ninja -cX
- Once build is done we can run the tool standalone
./run x
- Or we can install it
sudo ninja -Cx install
Commands for reference
- Record the screen
scrcpy --record file.mp4
scrcpy -r file.mkv
- Multiple Devices
scrcpy --serial 0123456789abcdef
scrcpy -s 0123456789abcdef # short version
- Show touches
scrcpy --show-touches
scrcpy -t
- Read only
scrcpy --no-control
scrcpy -n
Note: This was published earlier on now defunct https://til.anantshri.info/post/scrcpy/