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

Why do gas explosions happen so frequently? Please remember these facts

According to the People's Government of Beich...

Is the story of “The Crow and the Pitcher” true?

Is the story of “The Crow and the Pitcher” true? ...

How did Meilishuo get its first 1 million users?

The preparation for the seed user Meilishuo, which...

Unprecedented! Another major discovery in Sanxingdui

June 13 Sanxingdui is "updated" again A...

How to do content marketing for To B business?

When it comes to To B operations, content marketi...

How does information flow advertising use 10,000+ tags for precision marketing?

Different from traditional advertising, the bigge...

Microsoft may add network speed test function to Bing search

Microsoft Bing is developing very well in the Uni...

What is permafrost?

People living in the north have this experience: ...

“Soul” product operation analysis!

Social needs are the third need based on physiolo...