Skip to main content
Version: 4.0 (Archived) 📦

DASH deploy example

Delivery DASH 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 && make

Step 3, config SRS​

Please read DASH

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

# conf/dash.conf
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
vhost __defaultVhost__ {
dash {
enabled on;
dash_fragment 30;
dash_update_period 150;
dash_timeshift 300;
dash_path ./objs/nginx/html;
dash_mpd_file [app]/[stream].mpd;

Step 4, start SRS​

./objs/srs -c conf/dash.conf

Note: You can also use other web server, such as NGINX, to delivery files of DASH.

Step 5, start Encoder​

Use FFMPEG to publish stream:

    for((;;)); do \
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.flv \
-c copy \
-f flv rtmp://; \
sleep 1; \

The stream in SRS:

  • RTMP url:rtmp://
  • DASH url:

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.

Step 7, play DASH stream​

DASH url:

Please use VLC to play.

Winlin 2020.01