Skip to main content
Version: 4.0 (Archived) 📦

SRT deploy example

Delivery SRT by SRS:

Suppose the server ip is

Step 1, get SRS

For detail, read GIT

git clone
cd srs/trunk

Or update the exists code:

git pull

Step 2, build SRS

For detail, read Build

./configure --srt=on && make

Remark: Recommend srs-docker to run SRS and FFMPEG.

Step 3, config SRS

Save bellow as config, or use conf/srt.conf:

# conf/srt.conf
listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
srt_server {
    enabled on;
    listen 10080;
vhost __defaultVhost__ {

Note: About more parameters, please see SRT Parameters.

Note: More discussion about SRT, please read #1147.

Step 4, start SRS

./objs/srs -c conf/srt.conf

Step 5, start Encoder

Use FFMPEG to publish stream:

ffmpeg -re -i ./doc/source.flv -c copy -pes_payload_size 0 -f mpegts 'srt://!::r=live/livestream,m=publish'

You're able to play it by ffplay:

ffplay 'srt://!::r=live/livestream,m=request'

The stream in SRS:

  • RTMP url:rtmp://

Step 6, play RTMP stream

RTMP url is: rtmp://

User can use vlc to play the RTMP stream.

Note: Please replace all ip to your server ip.

Winlin 2020.01