Genymobile / scrcpy
Genymobile / scrcpy
This GitHub repo (https://github.com/Genymobile/scrcpy) is the only official source for the project. Do not download releases from random websites, even if their name contains scrcpy. 此 GitHub 仓库 (https://github.com/Genymobile/scrcpy) 是该项目的唯一官方来源。请勿从随机网站下载发布版本,即使其名称中包含 scrcpy。
scrcpy (v4.0) pronounced “screen copy” This application mirrors Android devices (video and audio) connected via USB or TCP/IP and allows control using the computer’s keyboard and mouse. It does not require root access or an app installed on the device. It works on Linux, Windows, and macOS. scrcpy (v4.0) 发音为“screen copy”。该应用程序可镜像通过 USB 或 TCP/IP 连接的 Android 设备(视频和音频),并允许使用计算机的键盘和鼠标进行控制。它不需要 root 权限,也不需要在设备上安装任何应用程序。它适用于 Linux、Windows 和 macOS。
It focuses on: lightness: native, displays only the device screen; performance: 30120fps, depending on the device; quality: 1920×1080 or above; low latency: 3570ms; low startup time: 1 second to display the first image; non-intrusiveness: nothing is left installed on the Android device; user benefits: no account, no ads, no internet required; freedom: free and open source software.
它专注于:轻量化:原生应用,仅显示设备屏幕;高性能:30120fps(取决于设备);高质量:1920×1080 或更高;低延迟:35~70ms;低启动时间:约 1 秒即可显示第一帧图像;非侵入性:Android 设备上不会残留任何安装内容;用户权益:无需账户、无广告、无需联网;自由:免费且开源的软件。
Its features include: audio forwarding (Android 11+), recording, virtual display, mirroring with Android device screen off, copy-paste in both directions, configurable quality, camera mirroring (Android 12+), mirroring as a webcam (V4L2) (Linux-only), physical keyboard and mouse simulation (HID), gamepad support, OTG mode and more… 其功能包括:音频转发(Android 11+)、录制、虚拟显示、Android 设备息屏镜像、双向复制粘贴、可配置画质、摄像头镜像(Android 12+)、作为网络摄像头镜像 (V4L2)(仅限 Linux)、物理键盘和鼠标模拟 (HID)、游戏手柄支持、OTG 模式等。
Prerequisites: The Android device requires at least API 21 (Android 5.0). Audio forwarding is supported for API >= 30 (Android 11+). Make sure you enabled USB debugging on your device(s). 先决条件:Android 设备至少需要 API 21 (Android 5.0)。音频转发支持 API >= 30 (Android 11+)。请确保已在设备上启用 USB 调试。
On some devices (especially Xiaomi), you might get the following error: “Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.” In that case, you need to enable an additional option “USB debugging (Security Settings)” (this is an item different from USB debugging) to control it using a keyboard and mouse. Rebooting the device is necessary once this option is set. Note that USB debugging is not required to run scrcpy in OTG mode. 在某些设备(尤其是小米)上,您可能会遇到以下错误:“Injecting input events requires the caller… to have the INJECT_EVENTS permission”。在这种情况下,您需要启用额外的“USB 调试(安全设置)”选项(这与普通的 USB 调试不同),才能使用键盘和鼠标进行控制。设置此选项后,必须重启设备。请注意,在 OTG 模式下运行 scrcpy 不需要 USB 调试。
Get the app: Linux, Windows (read how to run), macOS. 获取应用:Linux、Windows(阅读运行方法)、macOS。
Must-know tips: Reducing resolution may greatly improve performance (scrcpy -m1024); Right-click triggers BACK; Middle-click triggers HOME; Alt+f toggles fullscreen. There are many other shortcuts. 必备技巧:降低分辨率可以显著提高性能 (scrcpy -m1024);右键点击触发“返回”;中键点击触发“主页”;Alt+f 切换全屏。还有许多其他快捷键。
Usage examples: There are a lot of options, documented in separate pages. Here are just some common examples. 使用示例:有许多选项,记录在单独的页面中。以下仅是一些常见示例。
Capture the screen in H.265 (better quality), limit the size to 1920, limit the frame rate to 60fps, disable audio, and control the device by simulating a physical keyboard:
scrcpy --video-codec=h265 --max-size=1920 --max-fps=60 --no-audio --keyboard=uhid
scrcpy --video-codec=h265 -m1920 --max-fps=60 --no-audio -K # short version
以 H.265 格式(画质更好)捕获屏幕,限制尺寸为 1920,限制帧率为 60fps,禁用音频,并通过模拟物理键盘控制设备:
scrcpy --video-codec=h265 --max-size=1920 --max-fps=60 --no-audio --keyboard=uhid
scrcpy --video-codec=h265 -m1920 --max-fps=60 --no-audio -K # 简写版本
Start VLC in a new virtual display (separate from the device display):
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc
在新的虚拟显示器中启动 VLC(与设备显示器分离):
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc
Start VLC in a new flex display using H.265 with a bitrate of 16 Mbps, while keeping the display active so it does not turn off:
scrcpy --new-display -x --keep-active --start-app=org.videolan.vlc --video-codec=h265 -b16M
在新的灵活显示器中使用 H.265 启动 VLC,比特率为 16 Mbps,同时保持显示器处于活动状态,防止其熄灭:
scrcpy --new-display -x --keep-active --start-app=org.videolan.vlc --video-codec=h265 -b16M
Record the device camera in H.265 at 1920x1080 (and microphone) to an MP4 file:
scrcpy --video-source=camera --video-codec=h265 --camera-size=1920x1080 --record=file.mp4
以 1920x1080 分辨率录制设备摄像头(及麦克风)并保存为 MP4 文件:
scrcpy --video-source=camera --video-codec=h265 --camera-size=1920x1080 --record=file.mp4
Capture the device front camera and expose it as a webcam on the computer (on Linux):
scrcpy --video-source=camera --camera-size=1920x1080 --camera-facing=front --v4l2-sink=/dev/video2 --no-playback
捕获设备前置摄像头并将其作为网络摄像头在计算机上公开(仅限 Linux):
scrcpy --video-source=camera --camera-size=1920x1080 --camera-facing=front --v4l2-sink=/dev/video2 --no-playback
Control the device without mirroring by simulating a physical keyboard and mouse (USB debugging not required):
scrcpy --otg
通过模拟物理键盘和鼠标在不镜像的情况下控制设备(无需 USB 调试):
scrcpy --otg
Control the device using gamepads plugged into the computer:
scrcpy --gamepad=uhid
scrcpy -G # short version
使用插入计算机的游戏手柄控制设备:
scrcpy --gamepad=uhid
scrcpy -G # 简写版本
User documentation: The application provides a lot of features and configuration options. They are documented in the following pages: Connection, Video, Audio, Control, Keyboard, Mouse, Gamepad, Device, Window, Recording, Virtual display, Tunnels, OTG, Camera, Video4Linux, Shortcuts. 用户文档:该应用程序提供了许多功能和配置选项。它们记录在以下页面中:连接、视频、音频、控制、键盘、鼠标、游戏手柄、设备、窗口、录制、虚拟显示、隧道、OTG、摄像头、Video4Linux、快捷键。
Contact: You can open an issue for bug reports, feature requests or general questions. For bug reports, please read the FAQ first, you might find a solution to your problem immediately. 联系方式:您可以提交 Issue 进行错误报告、功能请求或一般性咨询。对于错误报告,请先阅读常见问题解答 (FAQ),您可能会立即找到问题的解决方案。
Donate: I’m @rom1v, the author and maintainer of scrcpy. If you appreciate this application, you can support my open source work: GitHub Sponsors, Liberapay, PayPal. 捐赠:我是 @rom1v,scrcpy 的作者和维护者。如果您喜欢这个应用程序,可以支持我的开源工作:GitHub Sponsors, Liberapay, PayPal。
License: Copyright (C) 2018 Genymobile, Copyright (C) 2018-2026 Romain Vimont. Licensed under the Apache License, Version 2.0. 许可协议:版权所有 (C) 2018 Genymobile,版权所有 (C) 2018-2026 Romain Vimont。根据 Apache License 2.0 版本授权。