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.2.0.tar.gz (4.0 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.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: liteboty_stream-0.2.0.tar.gz
  • Upload date:
  • Size: 4.0 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.2.0.tar.gz
Algorithm Hash digest
SHA256 fc18607dbad1f6a412faebcf9a32e78d3c819e3288c1a931501250786d1ee42d
MD5 9863b6c8c1a955dd06e830be8fd830a2
BLAKE2b-256 d2d9c1dc690a1c27321697dc3ca0154e34f5855094e0150bc0fb3036883953d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liteboty_stream-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f4cf57decb2f522117fd68be44b02c049c2149464efb6740b633de9e1887fe2
MD5 705c3c694fde33ddbeef69ee26a650d6
BLAKE2b-256 25b8967d1836936991398708f23e23ccd6ccb320736877fba86716097ff57586

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