Skip to main content

MYScrcpy Core

简介

从 MYScrcpy 项目中抽离出Core部分,方便直接引用开发。

同时简化包引用,方面Termux等特殊环境中安装引用。

安装

# 最小安装方式,该方式不包含numpy、pyperclip,适用于termux环境。
uv add mysc-core

注意! numpy在termux环境下特殊,需要使用 pkg install python-numpy,如果使用uv管理,需要添加 --system-site-packages 参数

# 完全安装方式,包含全部依赖包,适合PC环境
uv add mysc-core[all]
  • 如果使用剪切板同步功能,需单独安装 pyperclip 目前Termux环境不支持。
  • numpy在termux环境下特殊,需要使用 pkg install python-numpy,如果使用uv管理,需要添加全局变量

开发示例

获取视频流,音频及控制同理。

from adbutils import adb

from mysc_core.video import VideoAdapter, VideoKwargs

device = adb.device_list()[0]

# 定义视频适配器
va = VideoAdapter(
    # 定义连接参数
    VideoKwargs(
        video_codec=VideoKwargs.EnumVideoCodec.H264,
        max_fps=30
    )
)

# 发起连接
va.connect(device)

while True:
    
    # Pillow Image
    pil_img = va.get_image()
    
    # RGB np.ndarray
    data = va.get_ndarray(frame_format='rgb24')
    
    # 自定义逻辑

# 关闭连接
va.disconnect()

鸣谢

感谢 Scrcpy 项目及作者 rom1v,在这一优秀项目基础上,才有了本项目。

感谢使用到的各个包项目及作者们。有你们的付出,才有了如此好的软件开发环境。

同时感谢各位使用者们,谢谢你们的支持与帮助,也希望MYSC-Core成为你们得心应手的好工具,好帮手。

声明

本项目供日常学习(图形、声音、AI训练等)、Android测试、开发等使用。

请一定注意:

1.开启手机调试模式存在一定风险,可能会造成数据泄露等风险,使用前确保您了解并可以规避相关风险

2.本项目不可用于违法犯罪等使用

本人及本项目不对以上产生的相关后果负任何责任,请斟酌使用。

GUI

MYScrcpy 基于 MYSC-Core及Kivy/KivyMD 制作的Scrcpy python客户端。

Metadata

Release files for mysc-core 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mysc-core 1.0.1
File Size Uploaded Provenance
mysc_core-1.0.1.tar.gz 121.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mysc-core 1.0.1
File Interpreter ABI Platform
mysc_core-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 246.6 kB

Release files / mysc_core-1.0.1.tar.gz

Download URL mysc_core-1.0.1.tar.gz
Size 121.0 kB
Tags Source
SHA-256 checksum
How to use checksums
16473ee48c7554dc97ffbed3bab6d7e96dad8bbb8c78c452d808e06bd1cf8f9c
BLAKE2b-256 checksum
How to use checksums
4031c345e6d450ceff52377549fe82fb399251d3c4cc3c40e73d57371aebf22f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mysc_core-1.0.1-py3-none-any.whl

Download URL mysc_core-1.0.1-py3-none-any.whl
Size 125.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86a88e8510ecb1bbe9dd3f03333d465aadf7dff1a570c1a928e27d2dfe41e7a5
BLAKE2b-256 checksum
How to use checksums
9c5532620ef7b41994bd4df9001a397c0e6ae918ca107285038f4e84e9fb41ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mysc-core 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page