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.

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.8.0.tar.gz (176.8 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.8.0-py3-none-any.whl (138.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: muti_scrcpy_client-0.8.0.tar.gz
  • Upload date:
  • Size: 176.8 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.8.0.tar.gz
Algorithm Hash digest
SHA256 50d35b989cd8c849bc23e3d9136b2a7155ee50de84bbc670a7d5ac6896b8c2bb
MD5 36f5f23f048b6c1f1be1a5fbf2693a66
BLAKE2b-256 7451d583a21df4e170becd2dcfcdbf500e939ea1c746266a421795a908c996d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for muti_scrcpy_client-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2c18db537fcea3fb72c2cc69cdc2c2c6467b155107e545142022a6fffa6d48d
MD5 3ff74668ead6908f67f9dc41ab84c6fb
BLAKE2b-256 32b3bab6fe173615684fe25276c74f70fe904ae7867493229c2b0ac98e519ef4

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