Skip to main content
Livetran is a production-ready, self-hosted live streaming server built in Go. It provides a complete solution for ingesting live video streams via SRT, transcoding them to HLS format, and automatically uploading to Cloudflare R2 for scalable delivery. Whether you’re building a streaming platform, hosting live events, or creating content delivery infrastructure, Livetran gives you enterprise-grade features without the complexity.

Why Livetran?

  • Fast & Lightweight: Built with Go for high performance and low resource usage
  • Production Ready: Includes authentication, error handling, and observability
  • Scalable: Automatic uploads to Cloudflare R2 for global content delivery
  • Developer Friendly: Simple REST API with comprehensive webhook support
  • Flexible: Supports both single-profile and adaptive bitrate (ABR) streaming

What’s in the Box?

Secure SRT Ingestion

Low-latency SRT protocol support with automatic port allocation. Handles network instability gracefully with built-in error recovery.

JWT Stream Keys

Time-limited JWT-based stream keys (2-hour expiration) ensure only authorized encoders can publish. Each stream gets a unique, cryptographically secure key.

HMAC-SHA256 API Security

All API requests are signed with HMAC-SHA256 to prevent unauthorized access. Your secret key never leaves your server.

RESTful API

Simple, predictable API endpoints for starting, stopping, and monitoring streams. JSON responses with clear error messages.

Real-time Webhooks

Receive instant notifications on stream status changes (READY, STREAMING, STOPPED) with public playlist URLs included.

FFmpeg HLS Transcoding

Automatic transcoding to HLS with configurable segment duration (4s default). Supports both single-profile and multi-variant ABR ladders (1080p/720p/480p).

Cloudflare R2 Integration

Automatic file watching and upload to R2 with retry logic. Files are uploaded as soon as they’re created, ensuring minimal latency.

OpenTelemetry Metrics

Optional metrics export for monitoring stream counts, status, and performance. Integrates with Prometheus, Grafana, and other observability tools.

Quick Start

  1. Configure Environment: Set up your .env file with R2 credentials and secrets
  2. Start the Server: Run with Docker or locally with Go
  3. Start a Stream: Call the /api/start-stream endpoint with your stream ID
  4. Connect Your Encoder: Use the returned SRT URL in OBS or your streaming software
  5. Get Your Playlist: Receive the public HLS playlist URL via webhook
For detailed setup instructions, see the Deployment Guide.

Architecture Overview

Livetran follows a simple, efficient architecture:
  1. API Layer: REST endpoints handle stream lifecycle management
  2. Ingestion Layer: SRT listeners accept incoming streams on dynamically allocated ports
  3. Processing Layer: FFmpeg transcodes streams to HLS format in real-time
  4. Upload Layer: File watcher automatically uploads segments to Cloudflare R2
  5. Delivery Layer: HLS playlists and segments served via R2 public URLs
See the Introduction Guide for a detailed walkthrough of the architecture.

Ready to Get Started?