Giter Site home page Giter Site logo

cloudxtreme / srs-dolphin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ossrs/srs-dolphin

0.0 1.0 0.0 368 KB

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

License: MIT License

Makefile 4.08% C++ 95.92%

srs-dolphin's Introduction

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:

Project Goal Protocol Performance Deploy
srs-sharp HTTP-FLV HTTP 10k, 300%CPU Manual(*)
srs-dolphin RTMP/HTTP-FLV TCP 20k, 320%CPU Auto(*)

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

srs-dolphin's People

Contributors

winlinvip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.