SRS OSX(Mac) 编译

新建文件夹 名字随意 我的文件夹名为:sr_s

cd 到该文件夹下

clone srs 源码 我这里是通过码云镜像拉取

https://gitee.com/winlinvip/srs.oschina.git srs &&
 cd srs && git remote set-url origin https://github.com/ossrs/srs.git && git pull

进入trunk目录

cd trunk/

编译 OSX 工程

./configure --osx && make

等待几分钟后就好,编译成功显示如下

The build summary:
 +------------------------------------------------------------------------------------
 For SRS benchmark, gperf, gprof and valgrind, please read:
      http://blog.csdn.net/win_lin/article/details/53503869
 +------------------------------------------------------------------------------------
 |The main server usage: ./objs/srs -c conf/srs.conf, start the srs server
 |     About HLS, please read https://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS
 |     About DVR, please read https://github.com/ossrs/srs/wiki/v3_CN_DVR
 |     About SSL, please read https://github.com/ossrs/srs/wiki/v1_CN_RTMPHandshake
 |     About transcoding, please read https://github.com/ossrs/srs/wiki/v3_CN_FFMPEG
 |     About ingester, please read https://github.com/ossrs/srs/wiki/v1_CN_Ingest
 |     About http-callback, please read https://github.com/ossrs/srs/wiki/v3_CN_HTTPCallback
 |     Aoubt http-server, please read https://github.com/ossrs/srs/wiki/v2_CN_HTTPServer
 |     About http-api, please read https://github.com/ossrs/srs/wiki/v3_CN_HTTPApi
 |     About stream-caster, please read https://github.com/ossrs/srs/wiki/v2_CN_Streamer
 |     (Disabled) About VALGRIND, please read https://github.com/ossrs/state-threads/issues/2
 +------------------------------------------------------------------------------------
binaries, please read https://github.com/ossrs/srs/wiki/v2_CN_Build
You can:
  ./objs/srs -c conf/srs.conf
              to start the srs server, with config conf/srs.conf.

配置srs 将max_connections 设为200

vim conf/srs.conf
# main config for srs.
# @see full.conf for detail config.

listen              1935;
max_connections     200;
srs_log_tank        file;
srs_log_file        ./objs/srs.log;
http_api {
enabled         on;
listen          1985;
}
http_server {
enabled         on;
listen          8080;
dir             ./objs/nginx/html;
}
stats {
network         0;
disk            sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
}

启动

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

你可能感兴趣的:(SRS OSX(Mac) 编译)