MyGit

v1.23

Genymobile/scrcpy

版本发布时间: 2022-02-23 06:46:44

Genymobile/scrcpy最新发布版本:v2.7(2024-09-16 03:30:02)

To receive a notification on new releases, click on Watch > Custom > Releases on the top.


scrcpy v1.23

Changes since v1.22:


Highlights

HID/OTG on all platforms

Physical keyboard and mouse simulation (HID) was only available on Linux.

The previous release (v1.22) introduced a new OTG feature (--otg), to use the computer keyboard and mouse as if they were plugged directly to the device via an OTG cable, without mirroring and without requiring adb (USB debugging).

In v1.23, this feature is now also available on Windows (with some limitations) and macOS.

HID keyboard and mouse may be used either in "mirroring" mode (the default with mirroring enabled) or OTG mode (when --otg is passed):

# HID in mirroring mode
scrcpy --hid-keyboard --hid-mouse
scrcpy -KM  # the same, but using short options

# HID in OTG mode
scrcpy --otg --hid-keyboard --hid-mouse
scrcpy --otg -KM  # the same, but using short options
scrcpy --otg      # also the same, both keyboard and mouse are enabled if not specified

On Windows, it is not possible to open a USB device if it is already open by another process (like the adb daemon). As a consequence, we can't send HID events if adb is running. Therefore, HID in mirroring mode is not possible, only OTG mode is supported on Windows (and the adb daemon is killed before starting). See #3011.

EDIT: And there are still issues on Windows when USB debugging is disabled: #3050 :disappointed:

Also, due to an issue in the libusb prebuilt library for win32, this feature is disabled in the win32 release (it will be enabled later when it's fixed).

Also note that the mouse capture (when --hid-mouse is enabled) has some issues on macOS. A workaround for the main problem has been implemented, but you might need an additional click to get the mouse pointer back (see #3031).

HID support Mirroring mode OTG mode
Linux :heavy_check_mark: :heavy_check_mark:
macOS :heavy_check_mark: :heavy_check_mark:
Windows 64-bit :x: :heavy_check_mark:
Windows 32-bit :x: :x:

Improve device selection

Until now, if several devices were connected, scrcpy failed with:

$ scrcpy
scrcpy 1.22 <https://github.com/Genymobile/scrcpy>
error: more than one device/emulator
ERROR: "adb get-serialno" returned with value 1
ERROR: Could not get device serial
ERROR: Server connection failed

This was not very user-friendly: the user had to call adb devices manually to get the serial, then call scrcpy -s xxxxxxxxxx explicitly.

This release introduces features to improve device selection (#3005).

If several devices are connected, scrcpy prints the list of devices:

$ scrcpy
…
ERROR: Multiple (3) ADB devices:
ERROR:     -->   (usb)  fedcba09                        device  GM1913
ERROR:     -->   (usb)  01234567890abcdef         unauthorized  
ERROR:     --> (tcpip)  192.168.1.1:5555                device  Nexus_5
ERROR: Select a device via -s (--serial), -d (--select-usb) or -e (--select-tcpip)
ERROR: Server connection failed

So it is possible to immediately call scrcpy again with -s.

In addition, two new options allow to select a USB or TCP/IP device when there is only one connected:

For example, to run scrcpy with the single TCP/IP device:

$ scrcpy -e
…
DEBUG: ADB device found:
DEBUG:           (usb)  fedcba09                        device  GM1913
DEBUG:           (usb)  05f5e60a0ae518e5          unauthorized  
DEBUG:     --> (tcpip)  192.168.1.1:5555                device  Nexus_5

To run scrcpy with a single USB device:

$ scrcpy -d
…
ERROR: Multiple (2) ADB devices over USB:
ERROR:     -->   (usb)  fedcba09                        device  GM1913
ERROR:     -->   (usb)  01234567890abcdef         unauthorized  
ERROR:         (tcpip)  192.168.1.1:5555                device  Nexus_5
ERROR: Select a device via -s (--serial), -d (--select-usb) or -e (--select-tcpip)
ERROR: Server connection failed

Since there are several devices connected over USB in this example, it fails, with a detailed error message.

In OTG mode, the USB devices are also listed for convenience:

$ scrcpy --otg
…
ERROR: Multiple (2) USB devices:
ERROR:     --> fedcba09           (xxxx:xxxx)  OnePlus SM8150-MTP
ERROR:     --> 01234567890abcdef  (xxxx:xxxx)  LGE Nexus 5
ERROR: Select a device via -s (--serial)

Bash and ZSH completion scripts

Scrcpy has a lot of options. For convenience, auto-completion scripts were added for Bash (#3048) and ZSH (@hltdev8642, #3012).

Auto-downscale on MediaCodec error

Some devices are not able to encode a video at the device screen definition. As a consequence, for many users, the first experience with scrcpy was just a failure with a MediaCodec exception.

To solve this problem, the previous release (v1.22) added a mechanism to catch MediaCodec errors on start and automatically retry with a lower definition (scrcpy -m1024).

However, MediaCodec may fail in different ways (#2990, #3043), and some of them were not catched. Now they are.

FPS counter

It was possible to log the capture framerate in the console (printed every second), by pressing MOD+i in the scrcpy window. It was broken in v1.22 (nobody reported it, so it's probably not widely used), it's fixed now.

This release adds a new option --print-fps to start the FPS counter immediately.

Note that a new frame is produced only when the device screen surface "changes", so it's expected to get a low framerate depending on what you do on the device. For example:

Contact

Scrcpy now has a twitter account: @scrcpy_app There is also a subreddit: r/scrcpy

This might sometimes be more appropriate than GitHub issues when it's not to report a bug.

相关地址:原始地址 下载(tar) 下载(zip)

1、 scrcpy-server-v1.23 40.16KB

2、 scrcpy-win32-v1.23.zip 21.79MB

3、 scrcpy-win64-v1.23.zip 33.8MB

4、 SHA256SUMS.txt 264B

5、 SHA256SUMS.txt.asc 833B

查看:2022-02-23发行的版本