提供在windows、linux、mac进行命令行的录屏
GitHub - Genymobile/scrcpy: Display and control your Android device
要求安卓5.0以上版本,使能ADB debug
It focuses on:
- lightness: native, displays only the device screen
- performance: 30~120fps, depending on the device
- quality: 1920×1080 or above
- low latency: 35~70ms
- 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
Its features include:
- audio forwarding (Android 11+)
- recording
- 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/mouse simulation (HID)
- OTG mode
- and more…
- Connection
- Video
- Audio
- Control
- Device
- Window
- Recording
- Tunnels
- HID/OTG
- Camera
- Video4Linux
- Shortcuts
常见命令行 scrcpy --help
scrcpy -r localfile.mp4 录屏到指定文件
scrcpy -Nr localfile.mp4 在本地不现实安卓屏幕内容
import subprocess
import os
import timep=subprocess.Popen("scrcpy -Nr tmp.mp4", shell=True)time.sleep(5)
os.kill(p.pid, signal.CTRL_C_EVENT)