多实例srs:srs-srs-dolphin

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

原文地址: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


dolphin 源码 "C:\Program Files\Java\jdk1.8.0_161\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\workCode\apache-dolphinscheduler-3.2.2-src -Djansi.passthrough=true -Dmaven.home=D:/workSofts/apache-maven-3.6.0 -Dclassworlds.conf=D:\workSofts\apache-maven-3.6.0\bin\m2.conf "-Dmaven.ext.class.path=D:\workSofts\JetBrains\IntelliJ IDEA 2025.1.1.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\workSofts\JetBrains\IntelliJ IDEA 2025.1.1.1\lib\idea_rt.jar=62405" -Dfile.encoding=UTF-8 -classpath D:\workSofts\apache-maven-3.6.0\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2025.1.1.1 -s D:\workSofts\apache-maven-3.6.0\conf\settings.xml -Dmaven.repo.local=F:\ideamaven\MavenRepository clean [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Failure to find org.apache.dolphinscheduler:dolphinscheduler-bom:pom:3.2.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 30, column 25 [ERROR] 'dependencies.dependency.version' for org.codehaus.janino:janino:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 106, column 21 [ERROR] 'dependencies.dependency.version' for com.amazonaws:aws-java-sdk-s3:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 110, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 115, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-jetty:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 131, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-aop:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 146, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework:spring-context:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 157, column 21 [ERROR] 'dependencies.dependency.version' for org.hibernate.validator:hibernate-validator:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 162, column 21 [ERROR] 'dependencies.dependency.version' for io.fabric8:kubernetes-client:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 167, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 173, column 21 [ERROR] 'dependencies.dependency.version' for org.apache.curator:curator-test:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 179, column 21 [ERROR] 'dependencies.dependency.version' for net.sf.py4j:py4j:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 192, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.ldap:spring-ldap-core:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 197, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-kubernetes-client-config:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 202, column 21 [ERROR] 'dependencies.dependency.version' for org.apache.hbase.thirdparty:hbase-noop-htrace:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 207, column 21 [ERROR] 'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 212, column 21 [ERROR] 'dependencies.dependency.version' for org.casbin:casdoor-spring-boot-starter:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 218, column 21 [ERROR] 'dependencies.dependency.version' for org.springdoc:springdoc-openapi-ui:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 223, column 21 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.apache.dolphinscheduler:dolphinscheduler-api:3.2.2 (D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml) has 18 errors [ERROR] Non-resolvable import POM: Failure to find org.apache.dolphinscheduler:dolphinscheduler-bom:pom:3.2.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 30, column 25 -> [Help 2] [ERROR] 'dependencies.dependency.version' for org.codehaus.janino:janino:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 106, column 21 [ERROR] 'dependencies.dependency.version' for com.amazonaws:aws-java-sdk-s3:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 110, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 115, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-jetty:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 131, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-aop:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 146, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework:spring-context:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 157, column 21 [ERROR] 'dependencies.dependency.version' for org.hibernate.validator:hibernate-validator:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 162, column 21 [ERROR] 'dependencies.dependency.version' for io.fabric8:kubernetes-client:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 167, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 173, column 21 [ERROR] 'dependencies.dependency.version' for org.apache.curator:curator-test:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 179, column 21 [ERROR] 'dependencies.dependency.version' for net.sf.py4j:py4j:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 192, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.ldap:spring-ldap-core:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 197, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-kubernetes-client-config:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 202, column 21 [ERROR] 'dependencies.dependency.version' for org.apache.hbase.thirdparty:hbase-noop-htrace:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 207, column 21 [ERROR] 'dependencies.dependency.version' for com.h2database:h2:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 212, column 21 [ERROR] 'dependencies.dependency.version' for org.casbin:casdoor-spring-boot-starter:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 218, column 21 [ERROR] 'dependencies.dependency.version' for org.springdoc:springdoc-openapi-ui:jar is missing. @ org.apache.dolphinscheduler:dolphinscheduler-api:[unknown-version], D:\workCode\apache-dolphinscheduler-3.2.2-src\dolphinscheduler-api\pom.xml, line 223, column 21 [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException 进程已结束,退出代码为 1
最新发布
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值