Skip to main content

No project description provided

Project description

Liteboty Stream

Liteboty Stream 是一个基于 PySide6 的实时图像流显示程序,使用 Redis 作为消息传递机制。该程序可以订阅 Redis 频道,接收图像流,并在 GUI 窗口中展示图像。

特性

  • 订阅 Redis 频道并实时显示图像流
  • 支持动态调整窗口大小,图像自动按比例缩放
  • 简单易用的 PySide6 GUI 窗口

安装

推荐安装方式(通过 pip 安装)

您可以通过 pip 安装 liteboty-stream,这是最简便的安装方式:

pip install liteboty-stream

从源码安装

  1. 克隆此项目:

    git clone https://github.com/yourusername/liteboty-stream.git
    cd liteboty-stream
    
  2. 创建一个虚拟环境并激活它:

    python3 -m venv venv
    source venv/bin/activate  # 对于 Windows 用户,请使用 venv\Scripts\activate
    
  3. 安装依赖:

    pip install -r requirements.txt
    
  4. 安装 Redis 并确保 Redis 服务正在运行。您可以按照官方文档安装 Redis。

快速开始 (Quick Start)

要启动 Liteboty Stream,使用以下命令启动应用程序:

liteboty-stream --broker <REDIS_BROKER> --decode <DECODE_FORMAT> --channel <CHANNEL>

参数说明:

  • --broker: Redis 服务器的地址和端口(例如 10.8.2.2:6379
  • --decode: 图像解码格式(例如 RGBL
  • --channel: Redis 频道名称(例如 /video/raw

示例:

liteboty-stream --broker 10.8.2.128:6379 --decode RGB --channel /video/raw

运行后:

  1. 应用程序将连接到指定的 Redis 服务器和频道。
  2. 订阅的频道将发送图像数据,应用程序会将图像显示在窗口中。
  3. 您可以调整窗口的大小,图像将按比例缩放,并且窗口的最小尺寸会自动适应图像尺寸。

代码结构

  • liteboty_stream.py:主应用程序代码,包含窗口显示、图像接收和缩放逻辑。
  • redis_subscriber.py:Redis 订阅者实现,负责从 Redis 获取图像数据。
  • requirements.txt:项目依赖的 Python 库。

常见问题 (FAQ)

1. 如何调整窗口大小?

窗口会根据图像的大小动态调整,图像会按比例缩放以适应窗口大小。当您缩小窗口时,图像的大小也会变小。

2. 如何处理图像的解码?

在启动时,您可以通过 --decode 参数指定图像解码格式。常见的格式有 RGBL(灰度图像)。

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

liteboty_stream-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

liteboty_stream-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file liteboty_stream-0.1.1.tar.gz.

File metadata

  • Download URL: liteboty_stream-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.11 Windows/10

File hashes

Hashes for liteboty_stream-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2d958304a5d186c5b2623778e0d67fc76b4084459bd5104469cca57bff9ebc95
MD5 6e9482a23b219661fed43d5f896fe954
BLAKE2b-256 3696dab757b90e269aeb6c7a5cac255a0afaa900eb7a9f54479805afd54c5bba

See more details on using hashes here.

File details

Details for the file liteboty_stream-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: liteboty_stream-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.11 Windows/10

File hashes

Hashes for liteboty_stream-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f73de08f98a061c10a643d84faa9c8f626b254e805836fddd6e0c6a3f98f5bec
MD5 07935ada28c942ca0280fe1b40a8dcd9
BLAKE2b-256 33fb0f4cbb0f0ae5df9f115a0c7071d90dd74155dba81490e1de5eb026c5ecb0

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