服务器上复制多个srs实例包,然后修改主要配置文件的端口:
srs.conf
listen 1935;
# 修改监听端口为19352
listen 19352;
max_connections 1000;
srs_log_tank file;
srs_log_file /mnt/vod/srs/srs.log;
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
#listen 8080;
# 修改监听端口为8082
listen 8082;
dir ./objs/nginx/html;
}
stats {
network 0;
disk sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
hls {
enabled on;
hls_fragment 10;
hls_window 30;
hls_path /mnt/vod/m3u8/;
}
}
http.flv.live.conf
#listen 1935;
# 修改监听端口为19352
listen 19352;
max_connections 1000;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
# 修改监听端口为8082
listen 8082;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
}
启动
./objs/srs -c ./conf/srs.conf
RTMP流地址和推流地址为:rtmp://192.168.1.170:19352/live/livestream
HTTP FLV: http://192.168.1.170:8082/live/livestream.flv