trunk/3rdparty/srs-docs/doc/sample-rtmp-cluster.md
RTMP Edge cluster deploy example
RTMP Edge cluster is the kernel feature of SRS.
Suppose the server ip is 192.168.1.170
For detail, read GIT
git clone https://github.com/ossrs/srs
cd srs/trunk
Or update the exists code:
git pull
For detail, read Build
./configure && make
For detail, read RTMP and Edge
Save bellow as config, or use conf/origin.conf:
# conf/origin.conf
listen 19350;
max_connections 1000;
pid objs/origin.pid;
srs_log_file ./objs/origin.log;
vhost __defaultVhost__ {
}
For detail, read RTMP and Edge
Save bellow as config, or use conf/edge.conf:
# conf/edge.conf
listen 1935;
max_connections 1000;
pid objs/edge.pid;
srs_log_file ./objs/edge.log;
vhost __defaultVhost__ {
cluster {
mode remote;
origin 127.0.0.1:19350;
}
}
For detail, read RTMP and Edge
./objs/srs -c conf/origin.conf &
./objs/srs -c conf/edge.conf &
For detail, read RTMP and Edge
Use FFMPEG to publish stream:
for((;;)); do \
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.flv \
-c copy \
-f flv rtmp://192.168.1.170/live/livestream; \
sleep 1; \
done
Or use FMLE to publish:
FMS URL: rtmp://192.168.1.170/live
Stream: livestream
For detail, read RTMP and Edge
Origin RTMP url is: rtmp://192.168.1.170:19350/live/livestream, User can use vlc to play the RTMP stream.
Edge RTMP url is: rtmp://192.168.1.170:1935/live/livestream, User can use vlc to play the RTMP stream.
Note: Please replace all ip 192.168.1.170 to your server ip.
Winlin 2014.11