Getting Started with SRS
SRS (Simple Realtime Server) is a high-performance, open-source live streaming server that supports RTMP, HLS, HTTP-FLV, SRT, and MPEG-DASH. It is widely used as a media origin for live streaming platforms and CDNs. Available as a managed service in Eyevinn Open Source Cloud.
Prerequisites
- An Eyevinn OSC account (free trial or paid plan)
Step 1: Create an SRS instance
Navigate to the SRS service in the OSC web console. Click Create srs and enter a name for your instance.
Once the status indicator turns green and shows running, click the instance card to open the SRS console.
Step 2: Push a stream via RTMP
SRS listens for RTMP streams on port 1935 by default. Push a stream using OBS, ffmpeg, or any RTMP encoder:
INSTANCE_HOST=mystream.ossrs-srs.auto.prod.osaas.io
# Push using ffmpeg
ffmpeg -re -i input.mp4 \
-c:v libx264 -preset veryfast -b:v 2000k \
-c:a aac -b:a 128k \
-f flv rtmp://${INSTANCE_HOST}/live/stream
The stream key (last path segment, e.g. stream) can be any string you choose.
Step 3: Play the stream
Once a stream is being pushed, it is immediately available in multiple formats:
| Protocol | URL |
|---|---|
| HLS | https://{instance-host}/live/stream.m3u8 |
| HTTP-FLV | http://{instance-host}/live/stream.flv |
| RTMP | rtmp://{instance-host}/live/stream |
For example, play the HLS stream in a browser or player:
ffplay https://mystream.ossrs-srs.auto.prod.osaas.io/live/stream.m3u8
Step 4: View the SRS console
The SRS web console is available at your instance URL (no login required). It shows:
- Connected publishers (RTMP ingest streams)
- Active players per stream
- Real-time bitrate and frame rate statistics
Usage example (Node.js client)
const INSTANCE_URL = 'https://mystream.ossrs-srs.auto.prod.osaas.io';
// Fetch SRS API to list active streams
const response = await fetch(`${INSTANCE_URL}/api/v1/streams/`);
const { streams } = await response.json();
for (const stream of streams) {
console.log(`Stream: ${stream.name}, clients: ${stream.clients}`);
}
CLI usage
osc create ossrs-srs myserver -o name="myserver"