Coder Social home page Coder Social logo

srs-docker's Introduction

srs

A dockerized SRS. This is a much better solution than Wowza or Adobe Flash Media Server. It allows for sophisticated custom live streaming setups.

Usage

docker pull ossrs/srs:[tag]

Tags

  • latest, 2, 2.0, 2.0release: This is the latest build of 2.0release branch.
  • develop, 3, 3.0, 3.0release: This is the latest build of 3.0release branch.
  • specified version: You can specify a version like 2.0.250, 3.0.40 as tag.
  • with ffmpeg: By default, all builds do not contain ffmpeg binary. You can add suffix -ffmpeg after any tag if you want to use ffmpeg. (ex: 3.0-ffmpeg)

Run

You have to export the container port ( or use 3rd-party tcp proxy ) of SRS. For more information about port mapping.

A typical usage:

docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3.0

And you can specify the launch command and params such as the configuration file. By default it will launch objs/srs -c conf/docker.conf.

Example:

docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3.0 objs/srs -c my-custom.conf

Configuration

There is a default configuration that in the /srs/conf/docker.conf.

You can use docker volume to override it.

Example:

docker run -v ./my-custom.conf:/srs/conf/docker.conf ossrs/srs:3.0

Or mount a folder & start with custom configration file name:

docker run -v ./my-conf.d:/srs ossrs/srs:3.0 objs/srs -c /srs/my-conf.d/custom.conf

Examples

These examples use fig.

server

This is a simple server that runs one instance of srs for both transcoding, dvr and outputing hls. It runs an instance of nginx to distribute hls.

ingest

This is a ingest configuration for streaming a flv file to the srs server for testing.

hsfztv

This setup is used on www.hsfz.tv for live streaming of a school event. The setup for this example is a bit more involved due to the need to support both audience in China and out around the world.

  • origin: This server runs near the streaming source, it transcodes input stream to 720p h264 + aac. It will then distribute this transcoded stream via rtmp to multiple edge servers.

  • edge: We run two of these servers. The edge server transcodes the 720p stream into 463p, 360p and 216p. It then generates hls files for all four qualities. However, keep in mind that these streams in adaptive hls are not quite synchronized.

  • cdn: We use cloudfront for distributing the hls stream, which is basically a bunch of static files. But we also spawn multiple cdn machines of our own using this configuration to provide for viewers inside China where cloudfront is unstable. Using this setup, we can scale up our max bandwidth without stressing the srs server.

hsfztv

srs-docker's People

Contributors

huanghe2015 avatar pmextra avatar 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.