多实例srs:srs-srs-dolphin

SRS Dolphin 是一种多进程容器,用于启动多个独立进程中的 SRS 边缘节点。它支持 RTMP 和 HTTP-FLV 协议,并具备自动部署特性。相比 srs-sharp,SRS Dolphin 在性能上更优且支持多种流媒体协议。
摘要由CSDN通过智能技术生成

原文地址:https://github.com/ossrs/srs-dolphin


复制黏贴用法


srs-dolphin

The dolphin is a MultipleProcess SRS SRS container, which start multiple SRS in edge mode in seperate process.

About

The dolphin is the most simple MultipleProcess arch for RTMP/HTTP-FLV of SRS.

The srs-sharp is a similar project, but srs-sharp is a HTTP FLV reverse proxy, its performance is great and is's ok for HTTP FLV stream. The bellow table is a comparation between srs-sharp and srs-dolphin:

ProjectGoalProtocolPerformanceDeploy
srs-sharpHTTP-FLVHTTP10k, 300%CPUManual(*)
srs-dolphinRTMP/HTTP-FLVTCP20k, 320%CPUAuto(*)

Remark:

  1. Manual Deploy of srs-sharp: User should manually deply the SRS edge, then start srs-sharp to proxy the ports of SRS.
  2. Auto Deploy of srs-dolphin: User only need to start srs-dophin, which will auto manage the SRS.

Usage

Step 1: Prepare SRS:

cd ~ && git clone https://github.com/simple-rtmp-server/srs.git &&
cd ~/srs/trunk && ./configure --with-ffmpeg && make && ./objs/srs -c conf/srs.conf

Remark: We clone the SRS and Dolphin to user home, user can specify others.

Step 2: Clone the srs-dolphin:

cd ~ && git clone https://github.com/simple-rtmp-server/srs-dolphin.git

Step 3: Build and run the srs-dolphin:

cd ~/srs-dolphin/trunk && make && 
./objs/srs_dolphin -w 4 -p 19350 -x 8088 \
    -b ~/srs/trunk/objs/srs -c conf/dolphin.conf \
    -s 1936,1937,1938,1939 -y 8081,8082,8083,8084

Remark: User can specifies the SRS in other valid path.
Remark: The conf/dolphin.conf is a default conf for SRS by dolphin, user can use others.
Remark: Use the command to test your config for SRS in dolphin mode ~/srs/trunk/objs/srs -c conf/dolphin.conf -p 19350 -x 8088, it's ok when your SRS start normally.

Step 4: Publish stream

cd ~/srs/trunk &&
for ((;;)); do
    ./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
        -vcodec copy -acodec copy -f flv -y rtmp://127.0.0.1:1935/live/livestream
done

Step 5: Play stream

Origin SRS RTMP stream: rtmp://127.0.0.1:1935/live/livestream
Edge Dolphin RTMP stream: rtmp://127.0.0.1:19350/live/livestream
Edge Dolphin HTTP-FLV stream: http://127.0.0.1:8088/live/livestream.flv

Remark: User can use SB to do the benchmark.

Features

  1. Multiple Processes for SRS edge.
  2. Delivery stream in RTMP.
  3. Delivery stream in HTTP FLV.
  4. [dev] Support HTTP API for Multiple Processes.
  5. [dev] Muktiple Processes for SRS origin.
  6. [dev] Auto fork new process when worker or SRS exit.
  7. [dev] Load balance proxy for RTMP and HTTP-FLV.

Winlin 2015.5


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值