Skip to main content

一个基于CKPlayer的Python视频播放器包装器

Project description

Pyckplayer

一个基于 CKPlayer 的 Python 视频播放器包装器,支持在 Windows 系统上使用 Edge 浏览器或系统默认浏览器播放网络视频。

功能特点

  • 🎬 支持多种视频格式:mp4, flv, m3u8, ts 等
  • 📱 支持移动端和 PC 端
  • 🔗 支持点播、直播、直播+回放
  • 🎨 提供封面图支持
  • ⚡ 自动计算窗口大小,保持视频比例
  • 🧹 自动清理临时文件

安装方法

pip install Pyckplayer

使用方法

命令行方式

# 基本用法
pyckplayer <视频URL>

# 指定视频尺寸
pyckplayer <视频URL> -w 720 -h 1280

# 添加封面图
pyckplayer <视频URL> -p <封面图URL>

# 指定播放器标题
pyckplayer <视频URL> -t "我的视频"

# 使用系统默认浏览器(不使用Edge)
pyckplayer <视频URL> --no-edge

Python API

from pyckplayer import play_video

# 基本用法
play_video("https://example.com/video.mp4")

# 完整参数
play_video(
    url="https://example.com/video.mp4",
    width=720,
    height=1280,
    poster_url="https://example.com/cover.jpg",
    title="我的视频",
    use_edge=True
)

参数说明

参数 类型 说明
url str 视频URL(必需)
width int/float 视频宽度(像素)
height int/float 视频高度(像素)
poster_url str 封面图URL
title str 播放器标题,默认为 "CKPlayer"
use_edge bool 是否使用Edge浏览器,默认为 True

支持的平台

  • Windows 10/11
  • Python 3.8+

依赖

  • requests >= 2.31.0

开源协议

MIT License

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

pyckplayer-1.0.13.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

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

pyckplayer-1.0.13-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file pyckplayer-1.0.13.tar.gz.

File metadata

  • Download URL: pyckplayer-1.0.13.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pyckplayer-1.0.13.tar.gz
Algorithm Hash digest
SHA256 e7e3dbc81e469b0d4758cbf18fca56b14f54daef7e3046e53ceea5e0d790d2b2
MD5 bc277faebc8546607317435616dda565
BLAKE2b-256 934a7640314d0a96f6d682927d7cf93eef18b153c33e6c67efc6a3ea5458bd52

See more details on using hashes here.

File details

Details for the file pyckplayer-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: pyckplayer-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pyckplayer-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 cc3c771c068f089464923ceb915e4b8d2c1016407e8fd97c1ea937a377717077
MD5 4a0a968360a83f0dc74ca7983547f2ec
BLAKE2b-256 0ff8cf944da262058d40083d17a4a979c7a9e6d421ce3c6fdf61495a1ecce01f

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