VENUE DASHBOARD

RTMP SETUP

Configure a transcoder server to accept your RTMP stream and serve it as HLS to Alpha Live viewers. Choose nginx-rtmp or SRS — both are production-proven and free.

OBS / ENCODERRTMP INGESTTRANSCODERHLS OUTPUTALPHA LIVE

01 — OVERVIEW

HOW IT WORKS

INGEST URL

rtmp://ingest.alphalive.net/live

HLS BASE PATH

https://alphalive.net/hls/{streamId}/index.m3u8

RECOMMENDED SERVER

Ubuntu 22.04 LTS / Debian 12

MIN SPECS

2 vCPU · 4 GB RAM · 50 Mbps uplink

IMPORTANT

The transcoder server must be publicly reachable. Alpha Live's HLS player fetches manifests and segments directly from your server at https://alphalive.net/hls/{streamId}/index.m3u8. Configure your firewall to allow TCP 1935 (RTMP ingest) and TCP 80/443 (HLS output).

02 — TRANSCODER

SERVER CONFIG

01

Install nginx with RTMP module

bash
# Ubuntu / Debian
sudo apt update
sudo apt install -y nginx libnginx-mod-rtmp ffmpeg

# Verify
nginx -v
ffmpeg -version | head -1

NOTE

On Ubuntu 22.04+ the RTMP module ships as a separate package. If libnginx-mod-rtmp is not found, build nginx from source with the nginx-rtmp-module from GitHub.

02

Configure nginx.conf

nginx
# /etc/nginx/nginx.conf
# Add this RTMP block at the top level (outside http {})

rtmp {
    server {
        listen 1935;
        chunk_size 4096;

        application live {
            live on;
            record off;

            # Transcode to HLS using ffmpeg
            exec ffmpeg -i rtmp://localhost/live/$name
                -c:v libx264 -preset veryfast -tune zerolatency
                -b:v 2500k -maxrate 2500k -bufsize 5000k
                -vf "scale=1280:720"
                -c:a aac -b:a 128k -ar 44100
                -f hls
                -hls_time 2
                -hls_list_size 6
                -hls_flags delete_segments+append_list
                -hls_segment_filename /var/www/hls/$name-%03d.ts
                /var/www/hls/$name/index.m3u8;
        }
    }
}

http {
    # ... your existing http config ...

    server {
        listen 80;
        server_name ingest.alphalive.net;

        # Serve HLS segments
        location /hls {
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            root /var/www;
            add_header Cache-Control no-cache;
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Headers *;
        }

        # RTMP stats (optional)
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
    }
}
03

Create HLS output directory

bash
# Create HLS output dirs for each stream
sudo mkdir -p /var/www/hls
sudo chown -R www-data:www-data /var/www/hls
sudo chmod 755 /var/www/hls

# Create per-stream subdirectories (one per stream ID)
sudo mkdir -p /var/www/hls/stream-001
sudo mkdir -p /var/www/hls/stream-002
sudo mkdir -p /var/www/hls/stream-003
# ... repeat for each stream ID
sudo chown -R www-data:www-data /var/www/hls

TIP

The stream ID in the RTMP stream key must match the directory name. When a venue streams with key stream-001, nginx writes HLS to /var/www/hls/stream-001/index.m3u8.

04

Reload nginx and test

bash
# Test config syntax
sudo nginx -t

# Reload
sudo systemctl reload nginx

# Watch logs for incoming RTMP connections
sudo tail -f /var/log/nginx/error.log

# Verify HLS output appears after a test stream
ls -la /var/www/hls/stream-001/
# Expected: index.m3u8 + stream-001-001.ts stream-001-002.ts ...
05

Point Alpha Live HLS base URL to your server

Update the HLS_BASE_URL environment variable in your Alpha Live server to point at your nginx server. The stream watch page constructs the manifest URL as:

env
# .env / secrets
HLS_BASE_URL=https://ingest.alphalive.net/hls
# Results in: https://ingest.alphalive.net/hls/stream-001/index.m3u8

03 — SECURITY

SSL FOR HLS

IMPORTANT

Alpha Live is served over HTTPS. Browsers block mixed-content requests — your HLS manifest URL must also be HTTPS. Set up a free Let's Encrypt certificate on your ingest server before going live.

01

Install Certbot and get a certificate

bash
sudo apt install -y certbot python3-certbot-nginx

# Replace with your actual domain
sudo certbot --nginx -d ingest.alphalive.net

# Auto-renewal (runs twice daily via systemd timer)
sudo systemctl status certbot.timer
02

Verify HTTPS HLS delivery

bash
# Test HTTPS manifest fetch
curl -I https://ingest.alphalive.net/hls/stream-001/index.m3u8

# Check certificate expiry
echo | openssl s_client -connect ingest.alphalive.net:443 2>/dev/null \
  | openssl x509 -noout -dates

04 — TROUBLESHOOTING

COMMON ISSUES

SYMPTOM

Player shows "stream starting" indefinitely

CAUSE

HLS manifest not found at the expected URL

FIX

Check that /var/www/hls/{streamId}/index.m3u8 exists and nginx is serving it. Verify CORS headers include Access-Control-Allow-Origin: *

SYMPTOM

Stream connects but video is choppy / buffering

CAUSE

Keyframe interval mismatch or insufficient server bandwidth

FIX

Set OBS keyframe interval to exactly 2s. Ensure your server has at least 10 Mbps uplink per active stream.

SYMPTOM

RTMP connection refused on port 1935

CAUSE

Firewall blocking inbound TCP 1935

FIX

sudo ufw allow 1935/tcp — or add the rule in your cloud provider's security group.

SYMPTOM

Mixed content error in browser console

CAUSE

HLS URL is HTTP while the page is HTTPS

FIX

Install SSL on your ingest server (see section 03). All HLS URLs must be HTTPS.

SYMPTOM

ffmpeg exec not running in nginx-rtmp

CAUSE

ffmpeg not in PATH for www-data user

FIX

Use the full path: /usr/bin/ffmpeg. Verify with: sudo -u www-data which ffmpeg

Questions? Check the nginx-rtmp and SRS documentation, or open an issue on their GitHub repos.

BACK TO DASHBOARD
ALPHA LIVEEvery venue. Every night. Live.
© 2026 Alpha Live. All rights reserved.