Skip to content

Python tray-server that converts RTSP/H-264 cameras into lightweight MJPEG endpoints for browsers and PixPulse Viewer.

License

Notifications You must be signed in to change notification settings

zEhmsy/StreamTray

Repository files navigation

Contributors Forks Stargazers Issues Apache 2.0 License


StreamTray logo

StreamTray

Tiny Python tray-server that converts any RTSP camera/DVR
into lightweight MJPEG feeds for browsers & mobile apps.

Explore the docs » · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Key Features
  3. Getting Started
  4. Usage
  5. API Reference
  6. Roadmap
  7. License
  8. Contact

About The Project

StreamTray is a zero-config micro-server that sits in your system-tray, opens an RTSP connection once per camera, and re-streams frames as multipart/x-mixed-replace; boundary=frame.

This format is universally compatible, allowing any browser <img> tag or mobile framework (like Flutter) to render low-latency video feeds without complex players or HLS latency.

Architecture

┌────────────────────────┐
│                        │
│ RTSP/H-264│   Camera   │
│ streams ► │ DVR / NVR  │
└────────────────────────┘
            │
            ▼ (single connection per cam)
┌──────────────────────────┐
│    StreamTray Server     │
│  ▸ SQLite DB of streams  │
│  ▸ OpenCV Capture Engine │
│  ▸ MJPEG HTTP Endpoint   │
└──────────────────────────┘
            │
            ▼ (multiple clients)
  Browser ▸ <img src=/video_feed/uuid>
  Dashboard (localhost:5050)
  Mobile App (PixPulse Viewer)

(back to top)

Built With

  • Python
  • Flask
  • OpenCV
  • SQLite

(back to top)

Key Features

  • 🚀 Zero Config: Runs instantly from System Tray.
  • 🎥 Universal Compatibility: Converts RTSP to MJPEG for valid display in any HTML <img> tag.
  • 💻 Modern Dashboard: Manage streams, rename cameras, and preview feeds via a sleek Web UI.
  • 🏎️ High Performance: Centralized encoding engine ensures the camera is only polled once, regardless of client count.
  • 📦 Portable: Single executable (Windows .exe or macOS .app) with persistent SQLite storage.
  • 🌑 Dark Mode: Beautiful, responsive user interface with custom styling.

(back to top)

Getting Started

Prerequisites

  • Python 3.10+
  • RTSP Enabled Camera

Installation

  1. Clone the repo

    git clone https://github.com/zEhmsy/StreamTray.git
    cd StreamTray
  2. Install Python packages

    pip install -r requirements.txt
  3. Run the application

    python streamtray.py

    Or build the standalone app:

    # MacOS
    ./build_mac.sh

(back to top)

Usage

  1. Start the application. The StreamTray icon will appear in your system tray / menu bar.
  2. Click Open Dashboard (or go to http://localhost:5050).
  3. Click + Add Stream.
  4. Enter a "Friendly Name" (e.g., Front Door) and the RTSP URL (e.g., rtsp://user:pass@192.168.1.10:554/stream).
  5. The stream will immediately appear in the list.

Dashboard Preview

Use the Play button on any stream to open the live lightbox preview.

(back to top)

API Reference

The server exposes a RESTful API for integration.

Method Endpoint Description
GET /api/streams List all configured streams [{id, url, name}].
POST /api/streams Add a stream. Body: {"url": "...", "name": "..."}.
PUT /api/streams/<id> Update a stream.
DELETE /api/streams/<id> Remove a stream.
GET /video_feed/<id> MJPEG Live Stream. Embed as src in <img>.
GET /api/snapshot/<id> Single JPEG frame.

(back to top)

Roadmap

  • Basic RTSP to MJPEG bridging
  • Web Dashboard for management
  • Persistent SQLite Storage
  • Custom Stream Naming
  • MacOS .app Packaging
  • User Authentication (Login)
  • HLS / WebRTC Support
  • Docker Container

See the open issues for a full list of proposed features (and known bugs).

(back to top)

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

(back to top)

Contact

Project Link: https://github.com/zEhmsy/StreamTray

(back to top)

About

Python tray-server that converts RTSP/H-264 cameras into lightweight MJPEG endpoints for browsers and PixPulse Viewer.

Topics

Resources

License

Stars

Watchers

Forks