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

Your brain works harder than you think to tell you the order of time

In our perception, time is an invisible and intan...

How to write a coupon promotion plan?

This article will explain the following four poin...

Product Operation: How to build a closed loop of content ecology?

Have you ever had this experience: you just start...

Google VP criticizes Apple iMessage for "green bubble bullying" of Android users

On the morning of January 8, the Wall Street Jour...

Ford calls for equal treatment in the UK against favouring Nissan

Recently, Ford Europe CEO Jim Farley will meet wi...

Common SEO cheating methods, what are the means of Google SEO cheating?

Search engine optimization is a means to obtain a...

Kuaishou’s tips on how to create hits!

As a social method for the younger generation, &q...

For promotion on Xiaohongshu, just read this article.

This article will try to answer your questions: 1...