One-trick solution for multi-screen collaboration between mobile phones and computers

One-trick solution for multi-screen collaboration between mobile phones and computers

Introduction

Everyone should know that Huawei phones and computers can achieve one-touch transfer through Huawei Share. Sometimes this function is really convenient, and I am a little envious. Today I will introduce you to an open source project that can easily achieve multi-screen collaboration even if you don’t have a Huawei phone or computer.

scrcpy

scrcpy can connect to Android devices for display and control via USB, and can also be controlled wirelessly via TCP/IP. In addition, this software does not require root permissions to avoid warranty issues due to root.

scrcpy git address: https://github.com/Genymobile/scrcpy

The app supports Linux, Windows, and macOS

Features

  • Lightweight (native, only displays the device screen)
  • Performance (30~60fps)
  • Quality (resolution up to 1920x1080 or higher)
  • Low latency (35-70ms)
  • Quick start (begins displaying in seconds)
  • Non-intrusive (no need to install anything on your Android device)

Environmental requirements

The Android system version needs to be Android 5.0 (API 21) or above, and adb debugging needs to be enabled. The methods of enabling adb debugging may be slightly different for different phones. Here I will introduce how to enable adb debugging on Huawei phones.

Open Settings---> Scroll to the bottom of Settings and click About Phone---> Quickly click on the version number. If the following interface appears, it means that the system is enabled successfully.

Other models of mobile phones can Baidu to open the method

Install

Linux

On Debian (currently only testing and unstable versions, i.e. testing and sid versions) and Ubuntu (20.04):

  1. apt install scrcpy

Windows

Download the installation package directly. Please refer to github for the download link. You can use it after decompression without installation. After decompression, open cmd, enter the decompression directory of scrcpy, and enter the scrcpy command to start it.

The decompression directory is as follows:

Note: Before starting, you need to connect the phone to the computer via USB. When connected, the phone will prompt whether to debug, select Yes. If you find it troublesome to enter the decompressed directory every time you start the phone, you can add the path to the system environment variable path, and you don't need to enter the decompressed directory for subsequent startups.

macOS

  1. brew install scrcpy

Run scrcpy

Connect your computer and Android device via USB and execute:

  1. scrcpy

Supports execution with command line parameters, view the parameter list:

  1. scrcpy --help  

Function Introduction

Reduce resolution

Limit both the height and width to a certain size (such as 1024):

  1. scrcpy --max-size 1024    
  2. scrcpy -m 1024 # short version

The shorter side will be scaled down to keep the device's display aspect ratio, so a 1920x1080 device will display at 1024x576 resolution.

Modify the video bit rate

The default bit rate is 8Mbps. If you want to change the bit rate of the picture (for example, to 2Mbps):

  1. scrcpy --bit-rate 2M    
  2. scrcpy -b 2M # short version

Limit frame rate

The frame rate of the picture can be limited by the following command:

  1. scrcpy --max-fps 15  

Screen cropping

The device screen can be mirrored after cropping to show a portion of the screen.

This feature could be used, for example, to display only one eye of an Oculus Go.

  1. scrcpy --crop 1224:1440:0:0 # 1224x1440 at offset (0,0)  

If --max-size is also specified, the resolution change will be done after cropping.

Screen Recording

You can record video while mirroring the screen:

  1. scrcpy --record file.mp4  
  2. scrcpy -r file.mkv

To record without screen mirroring:

  1. scrcpy --no-display --record file.mp4  
  2. scrcpy -Nr file.mkv
  3. # Press Ctrl+C to stop recording

In addition, scrcpy also supports other functions, such as wireless connection, multi-device connection, SSH connection, file transfer, etc. For detailed usage tutorials, please refer to the official documentation.

Tips

If you want to make this tool more interesting, you can use scrcpy combined with python to develop some automated applications for controlling mobile phones, play mobile games, etc.

<<:  WeChat's new version has huge changes! Is it going to become a live broadcast software?

>>:  WeChat 7.0.22 is officially updated! The features you want are finally here

Recommend

Event planning and promotion sop!

Event operation is the most commonly used promoti...

Reusable community operation + live broadcast process!

Due to the impact of the epidemic in 2020, many c...

Now that mini programs are here, how should we respond?

What does a mini program mean to users? "Som...

Global temperature rise exceeds 1.5°C for the first time. What will we face?

Scientists had predicted that 2025 would be coole...

Do you like this iOS 14 concept design?

Although it is less than half a year away from th...

Data shows iPhone users are in no rush to update from iOS 14 to iOS 15

In September, Apple launched the iOS 15 software ...

Internet promotion must start with understanding users!

2016 was also a year of rapid development of the I...

What kind of insect is the "katydid" in "The Book of Songs"?

Produced by: Science Popularization China Author:...

Cook's Views on the Reformation

[[150408]] The Reformation movement, which began ...