Skip to content

bakedpanda/srt-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRT Player

A self-hosted web-based SRT stream viewer. It receives an SRT stream, converts it to HLS using FFmpeg, and serves it through a browser player. Includes audio meters, stream stats, and a passphrase gate to limit who can connect.

Features

  • Browser-based HLS playback
  • Left/right audio level meters with peak hold
  • Stream stats: resolution, frame rate, bitrate
  • Passphrase gate to prevent unwanted connections
  • Mute toggle (audio meters continue to work when muted)
  • Custom stream URL input for testing alternate sources
  • Responsive layout for mobile and desktop

Requirements

That's it. FFmpeg and Node.js are included in the Docker image.


Installation

1. Clone the repository

git clone https://github.com/bakedpanda/srt-player.git
cd srt-player

2. Create your environment file

Create a file called .env in the project folder:

PASSPHRASE=your-passphrase-here
SRT_URL=srt://your.stream.address:port

See the Environment Variables section below for details.

3. Start the container

docker compose up -d

The player will be available at http://your-server-ip:8500

Stopping

docker compose down

Updating

git pull
docker compose up -d --build

Environment Variables

Variable Required Description
PASSPHRASE Yes The passphrase users must enter before connecting to the stream
SRT_URL No The default SRT stream address (e.g. srt://192.168.1.10:9000). If not set, users will be prompted to enter a URL when they connect

PASSPHRASE

This is a simple access gate intended to prevent accidental or uninvited connections — useful when the stream source can only handle a limited number of viewers. It is not a secure authentication system; treat it like a shared codeword rather than a password.

When a user clicks Connect, they are first asked whether the camera is currently on air. If they answer no (i.e. they want to connect for monitoring/testing), they are prompted for the passphrase before the stream starts.

SRT_URL

The address of your SRT stream source. If your stream address never changes, set this here and users won't need to enter anything. Example:

SRT_URL=srt://192.168.1.50:9000

If you leave this blank, a URL input popup will appear automatically during the connect flow. This is useful if the stream address changes between sessions or for testing different sources.

Belabox users: your Generic SRT watch URL can be found in Belabox Cloud under SRT(LA) Relays.

Users can also temporarily override the default URL using the link icon button in the player controls. This custom URL is held in memory only and is cleared when the page is closed or the stream is disconnected.


Deploying with Portainer

If you're using Portainer to manage your Docker stacks:

  1. Add a new stack and point it to this repository
  2. Under Environment variables, add:
    • PASSPHRASE → your chosen passphrase
    • SRT_URL → your stream address (optional)
  3. Deploy the stack

The container exposes port 8500. Make sure this port is available on your host.


How it works

SRT source → FFmpeg (in container) → HLS segments → Browser via hls.js

When a user connects, the server spawns an FFmpeg process that reads the SRT stream and outputs HLS segments to a temporary directory. The browser polls for these segments and plays them back with a short live delay. When the user disconnects, FFmpeg is stopped and the segments are deleted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages