centos6.4 simple-rtmp-server流媒体集群服务器配置文档

张 佃栋 流媒体 2018-04-20 1,459 次浏览 , , 6条评论

Simple-RTMP-Server集群服务器初步配置文档

此次配置使用srs2.0 stable版本

配置环境 centos 6.4 软件版本 srs2.0 stable   srs下载地址:https://github.com/ossrs/srs

服务器:

origin  edge  10.0.1.1

edge  10.0.1.2

  1. 服务器镜像获取

wgt –S wget https://github.com/ossrs/srs/archive/2.0release.zip

编译系统

./configure  –prefix=/usr/local/srs

make && make install

安装命令会将SRS默认安装到/usr/local/srs中,可以在configure时指定其他目录,建立启动服务

2 编写10.0.1.1 SRS源站配置文件。

将以下内容保存为文件,譬如conf/origin.conf,服务器启动时指定该配置文件(srs的conf文件夹有该文件)。

# conf/origin.conf

listen              19350;

max_connections     1000;

pid                 objs/origin.pid;

srs_log_file        ./objs/origin.log;

vhost __defaultVhost__ {

}

3.编写10.0.1.1 SRS边缘配置文件。

将以下内容保存为文件,譬如conf/edge.conf,服务器启动时指定该配置文件(srs的conf文件夹有该文件)。

# conf/edge.conf

listen              1935;

max_connections     1000;

pid                 objs/edge.pid;

srs_log_file        ./objs/edge.log;

vhost __defaultVhost__ {

mode            remote;

origin          10.0.1.1:19350;

}

  1. 编写10.0.1.2 SRS边缘配置文件。

将以下内容保存为文件,譬如conf/edge.conf,服务器启动时指定该配置文件(srs的conf文件夹有该文件)。

# conf/edge.conf

listen              1935;

max_connections     1000;

pid                 objs/edge.pid;

srs_log_file        ./objs/edge.log;

vhost __defaultVhost__ {

mode            remote;

origin          10.0.1.1:19350;

}

 

  1. 启动SRS。详细参考RTMP分发

10.0.1.1

./objs/srs -c conf/origin.conf &&

./objs/srs -c conf/edge.conf

10.0.1.2

./objs/srs -c conf/edge.conf

  1. 启动推流编码器。详细参考RTMP分发

使用FMLE推流:

FMS URL: rtmp://10.0.1.1/live

Stream:sdtv

  1. 播放RTMP流

rtmp://10.0.1.1/live/sdtv

rtmp://10.0.1.2/live/sdtv

后续有待深入研究优化。

本文出自张佃栋de博客,转载时请注明出处及相应链接。

本文永久链接: https://zhangdd.com/269.html

6条评论

  1. It is not my first time to go to see this web
    site, i am browsing this web page dailly and take fastidious data from here everyday.

    • 张 佃栋说道:

      ooops
      but this website just wrtie by Chinese,and you could read chinese ether?

  2. What’s up, of course this article is in fact pleasant
    and I have learned lot of things from it concerning blogging.
    thanks. http://2chagasleish.uniandes.edu.co/index.php/component/k2/itemlist/user/25179

  3. I loved as much as you will receive carried out right here.

    The sketch is attractive, your authored subject matter stylish.

    nonetheless, you command get got an edginess over that you wish be
    delivering the following. unwell unquestionably come
    further formerly again as exactly the same nearly a lot often inside case you shield this hike. http://gaoyishop.com/comment/html/?46794.html

  4. Thanks for sharing your thoughts on linux. Regards http://spynet.gr/

Natural Stone Quarry Rock Quarry进行回复 取消回复

电子邮件地址不会被公开。 必填项已用*标注

Protected with IP Blacklist CloudIP Blacklist Cloud
回顶部