Skip to content

Eyevinn/strom

Repository files navigation

Strom - GStreamer Flow Engine

Strom (Swedish for "stream") is a visual, web-based interface for creating and managing GStreamer media pipelines. Design complex media flows without writing code.

Strom Screenshot Visual pipeline editor showing a simple test flow

Features

  • Visual Pipeline Editor - Node-based graph editor in your browser
  • Real-time Control - Start, stop, and monitor pipelines via REST API or WebSocket
  • Element Discovery - Browse and configure any installed GStreamer element
  • Reusable Blocks - Create custom components from element groups (e.g., AES67 receiver)
  • Authentication - Secure with session login or API keys (optional)
  • Auto-restart - Pipelines survive server restarts
  • Native or Web - Run as desktop app or web service
  • MCP Integration - Control pipelines with AI assistants (Claude, etc.)
  • CI/CD - Automated testing, building, and releases for Linux, Windows, and macOS

Advanced Capabilities

  • Dynamic Pad Linking - Automatic handling of runtime-created pads (decodebin, demuxers)
  • Automatic Tee Insertion - Fan-out outputs without manual configuration
  • Pad Properties - Configure per-pad properties (e.g., volume/mute on audiomixer inputs)
  • Debug Graphs - Generate SVG visualizations of running pipelines
  • WebSocket/SSE - Real-time state updates and pipeline events

Quick Start

Option 1: Using Pre-built Binaries (Fastest)

Download the latest release for your platform from GitHub Releases:

# Linux
wget https://github.com/Eyevinn/strom/releases/latest/download/strom-backend-v*-linux-x86_64
chmod +x strom-backend-v*-linux-x86_64
./strom-backend-v*-linux-x86_64

# macOS
# Download and run the macOS binary

# Windows
# Download and run the .exe file

Open your browser to http://localhost:3000 to access the web UI.

Option 2: Using Docker (Recommended for Testing)

# Pull and run the latest version
docker pull eyevinntechnology/strom:latest
docker run -p 3000:3000 -v $(pwd)/data:/data eyevinntechnology/strom:latest

# Or build locally
docker build -t strom .
docker run -p 3000:3000 -v $(pwd)/data:/data strom

Access the web UI at http://localhost:3000

Option 3: Building from Source

Prerequisites

# Install GStreamer
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
  gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav

# Install Rust and tools
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
cargo install trunk

Run

# Production mode (web UI at http://localhost:3000)
cargo run --release

# Development with hot reload
cargo run                    # Backend (Terminal 1)
cd frontend && trunk serve   # Frontend (Terminal 2)

# Headless mode (API only)
cargo run --release -- --headless

First Steps

Once Strom is running:

  1. Open http://localhost:3000 in your browser
  2. Browse available GStreamer elements in the palette
  3. Drag elements onto the canvas to create your pipeline
  4. Connect elements by dragging from output pads to input pads
  5. Configure element properties in the inspector panel
  6. Click "Start" to launch your pipeline

For API usage, visit http://localhost:3000/swagger-ui for interactive documentation.

CI/CD

Strom includes automated CI/CD pipelines for continuous integration, testing, and releases:

Continuous Integration

On every push to main and pull requests, automated checks run:

  • Format Check - Ensures code follows Rust formatting standards
  • Clippy Linting - Static analysis for backend, MCP server, and frontend (WASM)
  • Test Suite - Runs all tests for backend and MCP server
  • Multi-platform Builds - Builds binaries for Linux, Windows, and macOS

Automated Releases

When a version tag is pushed (e.g., v0.1.0):

  • Cross-platform Binaries - Automatically builds for Linux, Windows, and macOS
  • GitHub Releases - Creates release with binaries and generated release notes
  • Docker Publishing - Publishes multi-platform images (amd64/arm64) to Docker Hub

Docker Hub

Pre-built Docker images are available:

docker pull eyevinntechnology/strom:latest
docker pull eyevinntechnology/strom:0.1.0  # Specific version

Architecture

┌─────────────────────────────────┐
│  Frontend (egui → WebAssembly)  │
│  - Visual flow editor           │
│  - Element palette              │
│  - Property inspector           │
└────────────┬────────────────────┘
             │ REST + WebSocket/SSE
┌────────────▼────────────────────┐
│  Backend (Rust + Axum)          │
│  - Flow manager                 │
│  - GStreamer integration        │
│  - Block registry (AES67, ...)  │
│  - JSON persistence             │
└─────────────────────────────────┘

Workspace Members:

  • strom-types - Shared domain models and API types
  • strom-backend - Server with GStreamer pipeline management
  • strom-frontend - egui UI (compiles to WASM or native)
  • strom-mcp-server - Model Context Protocol server for AI integration

API Overview

Flows

  • GET/POST/DELETE /api/flows - Manage pipeline configurations
  • POST /api/flows/:id/start - Start pipeline
  • POST /api/flows/:id/stop - Stop pipeline

Elements

  • GET /api/elements - List available GStreamer elements
  • GET /api/elements/:name - Get element details and properties

Blocks

  • GET/POST/DELETE /api/blocks - Manage reusable component definitions
  • GET /api/blocks/categories - List block categories

Real-time

  • GET /api/events - Server-Sent Events stream
  • WS /api/ws - WebSocket connection

See OpenAPI docs at /swagger-ui when server is running.

Configuration

Configure via command-line arguments or environment variables:

# Server
--port 3000                           # or STROM_PORT=3000

# Storage paths (priority: CLI args > env vars > defaults)
--data-dir /path/to/data              # or STROM_DATA_DIR=/path/to/data
--flows-path /custom/flows.json       # or STROM_FLOWS_PATH=/custom/flows.json
--blocks-path /custom/blocks.json     # or STROM_BLOCKS_PATH=/custom/blocks.json

# Logging
RUST_LOG=info

Default storage locations:

  • Docker: ./data/ (current directory)
  • Linux: ~/.local/share/strom/
  • Windows: %APPDATA%\strom\
  • macOS: ~/Library/Application Support/strom/

Note: Individual file paths (--flows-path, --blocks-path) override --data-dir.

Authentication

Strom supports two authentication methods to protect your installation:

1. Session-Based Authentication (Web Login)

Perfect for web UI access with username/password login.

Setup:

# Generate a password hash
cargo run -- hash-password
# Or with Docker:
docker run eyevinntechnology/strom:latest hash-password

# Enter your desired password when prompted
# Copy the generated hash

Configure environment variables:

export STROM_ADMIN_USER="admin"
export STROM_ADMIN_PASSWORD_HASH='$2b$12$...'  # Use single quotes to preserve special characters

# Run Strom
cargo run --release

Usage:

  • Navigate to http://localhost:3000
  • Login with your configured username and password
  • Session persists for 24 hours of inactivity
  • Click "Logout" button in the top-right to end session

2. API Key Authentication (Bearer Token)

Perfect for programmatic access, scripts, and CI/CD.

Setup:

export STROM_API_KEY="your-secret-api-key-here"

# Run Strom
cargo run --release

Usage:

# All API requests must include the Authorization header
curl -H "Authorization: Bearer your-secret-api-key-here" \
  http://localhost:3000/api/flows

Using Both Methods

You can enable both authentication methods simultaneously:

# Enable both session and API key authentication
export STROM_ADMIN_USER="admin"
export STROM_ADMIN_PASSWORD_HASH='$2b$12$...'
export STROM_API_KEY="your-secret-api-key-here"

cargo run --release

Users can then:

  • Login via web UI with username/password
  • Access API with Bearer token

Docker Authentication

docker run -p 3000:3000 \
  -e STROM_ADMIN_USER="admin" \
  -e STROM_ADMIN_PASSWORD_HASH='$2b$12$...' \
  -e STROM_API_KEY="your-api-key" \
  -v $(pwd)/data:/data \
  eyevinntechnology/strom:latest

Disabling Authentication

Authentication is disabled by default if no credentials are configured. To run without authentication (development only):

# Simply run without setting auth environment variables
cargo run --release

⚠️ Security Warning: Never expose an unauthenticated Strom instance to the internet or untrusted networks.

Protected Endpoints

When authentication is enabled, all API endpoints except the following require authentication:

  • GET /health - Health check
  • POST /api/login - Login endpoint
  • POST /api/logout - Logout endpoint
  • GET /api/auth/status - Check auth status
  • Static assets (frontend files)

Blocks System

Create reusable components from element groups:

Built-in Blocks:

  • AES67 Receiver - ST 2110-30 audio receiver with SDP generation
  • Custom blocks via JSON or API

Example: Add AES67 block to receive network audio streams, automatically generates proper SDP with multicast addressing.

See docs/BLOCKS_IMPLEMENTATION.md for details.

MCP Integration

Enable AI assistants to manage pipelines:

# Start MCP server
cd mcp-server
cargo run

# Configure in Claude Desktop
# See mcp-server/README.md

Example: "Create a flow that encodes video to H.264 and streams via SRT"

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/Eyevinn/strom.git
cd strom

# Install GStreamer dependencies
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
  gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav

# Install Rust toolchain
rustup target add wasm32-unknown-unknown
cargo install trunk

# Install git hooks for automated checks
./scripts/install-hooks.sh

Testing

Strom includes comprehensive tests to ensure quality and reliability.

Run All Tests

# Run all tests across the workspace
cargo test --workspace

# Run tests with output
cargo test --workspace -- --nocapture

# Run tests for specific package
cargo test --package strom-backend
cargo test --package strom-mcp-server
cargo test --package strom-types

Run Specific Tests

# Run a specific test by name
cargo test test_name

# Run tests matching a pattern
cargo test pipeline

# Run integration tests only
cargo test --test '*'

Code Quality Checks

# Format code (required before committing)
cargo fmt --all

# Check formatting without modifying files
cargo fmt --all -- --check

# Run linter (Clippy)
cargo clippy --workspace -- -D warnings

# Lint specific packages
cargo clippy --package strom-backend --all-targets --all-features -- -D warnings
cargo clippy --package strom-frontend --target wasm32-unknown-unknown -- -D warnings

Frontend Testing

# Build frontend for development
cd frontend
trunk serve

# Build frontend for production
trunk build --release

# Check frontend compiles for WASM
cargo check --package strom-frontend --target wasm32-unknown-unknown

Manual Testing

To test Strom manually:

  1. Start the backend:

    cargo run --package strom-backend
  2. Access the UI: Open http://localhost:3000 in your browser

  3. Test a simple pipeline:

    • Add a videotestsrc element
    • Add an autovideosink element
    • Connect them and click "Start"
    • You should see a test pattern window
  4. Test the API:

    # List all flows
    curl http://localhost:3000/api/flows
    
    # Get available elements
    curl http://localhost:3000/api/elements
    
    # View API documentation
    open http://localhost:3000/swagger-ui

Docker Testing

# Build Docker image locally
docker build -t strom:test .

# Run and test
docker run -p 3000:3000 strom:test

# Test with custom data directory
docker run -p 3000:3000 -v $(pwd)/test-data:/data strom:test

Pre-commit Checks

The git hooks run these checks automatically before each commit:

  • Code formatting (cargo fmt)
  • Linting (cargo clippy)
  • Tests (cargo test)

If any check fails, the commit is blocked until issues are resolved.

Project Structure

strom/
├── types/          # Shared types (flows, elements, blocks, API)
├── backend/        # Axum server + GStreamer integration
│   └── src/
│       ├── api/    # REST endpoints
│       ├── gst/    # Pipeline management
│       └── blocks/ # Block registry and built-ins
├── frontend/       # egui UI (WASM/native)
├── mcp-server/     # AI assistant integration
└── docs/           # Documentation
    ├── BLOCKS_IMPLEMENTATION.md
    ├── CONTRIBUTING.md
    └── TODO.md

Known Issues

Some GStreamer elements cause segfaults during introspection and are automatically skipped:

  • GES elements (gesdemux, gessrc)
  • HLS elements (hlssink*, hlsdemux*)
  • Certain aggregator elements require special handling

See docs/PAD_TEMPLATE_CRASH_FIX.md and docs/MPEGTSMUX_DEADLOCK_FIX.md for technical details.

Contributing

See docs/CONTRIBUTING.md

License

MIT OR Apache-2.0

About

Gstreamer GUI and flow engine

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages