Skip to main content

A multi-device Python client for scrcpy

Project description

Python MutiScrcpy Client

This package allows you to view and control Android devices in realtime.

关于 “muti” 拼写:PyPI 包名 muti-scrcpy-client 与类名 MutiClient 是项目首次发布时遗留的拼写错误(应为 multi)。包名一旦上线无法重命名,因此保留原样;新代码推荐使用拼写正确的别名 from scrcpy import MultiClient,旧名 MutiClient 仍然可用。

demo png

Note: This gif is compressed and experience lower quality than actual.

How to use

Install the core library if you only need Python access to scrcpy frames and control commands:

pip install muti-scrcpy-client

Install the ui extra if you want to run the PySide6 desktop interface:

pip install "muti-scrcpy-client[ui]"

Then start the desktop interface:

py-muti-scrcpy

The py-muti-scrcpy command requires the ui extra because it imports PySide6.

Linux 桌面分发包

需要 .deb / .rpm / .AppImage 安装包(用户无需自行装 Python)?项目根目录执行 make pkg 即可,详细工具准备和说明见 packaging/README.md

Document

Here is the project documentation: Documentation Also, you can check scrcpy_ui/main.py for a full functional demo.

scrcpy v3.3.4 升级记录

项目内置的 scrcpy-server.jar 已从 scrcpy v1.20 升级到 scrcpy v3.3.4,用于适配 Android 16 上 SurfaceControl.createDisplay、剪贴板监听等服务端 API 变化。

升级时同步做了这些客户端协议调整:

  • 替换 scrcpy/scrcpy-server.jar 为官方 scrcpy-server-v3.3.4
  • 服务端启动参数从 v1.20 的位置参数改为 v3 的 key=value 参数。
  • 显式关闭 audio:audio=false,保留 video/control 通道,避免旧客户端误读额外音频 socket。
  • 保留 codec meta 读取视频宽高,关闭 frame meta,让 Python 解码器继续按裸 H.264 数据解码。
  • 更新触摸、滚动、剪贴板、屏幕电源等控制消息格式以匹配 v3 协议。
  • 增加视频 socket 关闭时的服务端日志读取,便于定位 Android 端 scrcpy-server 崩溃。
  • 修复 Qt 显示非连续 ndarray 时的 ndarray is not C-contiguous 报错。
  • 合并原先 scrcpy_ui/scrcpy/ 重复实现:MutiClient 现在直接继承 Client,仅保留 scrcpy/ 一份核心代码。

如果后续继续跟进 scrcpy 新版本,重点检查 scrcpy/core.pyscrcpy/muti_core.pyscrcpy/control.py 即可。

Reference & Appreciation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muti_scrcpy_client-0.9.0.tar.gz (242.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muti_scrcpy_client-0.9.0-py3-none-any.whl (201.1 kB view details)

Uploaded Python 3

File details

Details for the file muti_scrcpy_client-0.9.0.tar.gz.

File metadata

  • Download URL: muti_scrcpy_client-0.9.0.tar.gz
  • Upload date:
  • Size: 242.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for muti_scrcpy_client-0.9.0.tar.gz
Algorithm Hash digest
SHA256 b055dd51c4042d8174b9b3ef48ec2589e7f9b50318d98cd6021cae8cf8fbdb73
MD5 bda5f6a6670d1aa271bf6ca643dd17cd
BLAKE2b-256 b4da058b691072eec4f4a4791b4129a76f6b1d8c22eba86bd4e5171f44bb8c38

See more details on using hashes here.

File details

Details for the file muti_scrcpy_client-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for muti_scrcpy_client-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a58719160098ecef6580662743d2d9231385e94c8511fcf60966368d9550f12
MD5 235d4fdc41a2db61d73a70bc579571a7
BLAKE2b-256 bef3491b803bbe7a2077c08814a350d6c09136b614309f4c5c1347f7297fb566

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page