Skip to content

ossrs/dev-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

SRS

The v4(CentOS7) docker images for SRS, moved to releases.

SRS 4.0 is not released yet, so it's develop version and not stable.

Usage: Live Streaming only

Run SRS in docker by(images is here or there):

# For live streaming only, without WebRTC.
docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \
    registry.cn-hangzhou.aliyuncs.com/ossrs/srs:4

If it works, open http://localhost:8080/ to check it, then publish stream by:

docker run --rm --network=host registry.cn-hangzhou.aliyuncs.com/ossrs/srs:encoder \
  ffmpeg -re -i ./doc/source.200kbps.768x320.flv -c copy \
      -f flv -y rtmp://localhost/live/livestream

Play the following streams by players:

The online demos and players are available on ossrs.net.

Usage: WebRTC for macOS

Run SRS in docker by(images is here or there):

# For macOS, with WebRTC
docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \
    --env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}') -p 8000:8000/udp \
    ossrs/srs:4

For WebRTC, user MUST specify the ip by env CANDIDATE, please read Config: Candidate.

If it works, open http://localhost:8080/ to check it, then publish stream by:

docker run --rm --network=host registry.cn-hangzhou.aliyuncs.com/ossrs/srs:encoder \
  ffmpeg -re -i ./doc/source.200kbps.768x320.flv -c copy \
      -f flv -y rtmp://localhost/live/livestream

Note: If WebRTC enabled, you can publish by H5.

Play the following streams by players:

The online demos and players are available on ossrs.net.

Usage: WebRTC for CentOS

Run SRS in docker by(images is here or there):

# For CentOS, with WebRTC
docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \
    --env CANDIDATE=$(ifconfig eth0|grep 'inet '|awk '{print $2}') -p 8000:8000/udp \
    ossrs/srs:4

For WebRTC, user MUST specify the ip by env CANDIDATE, please read Config: Candidate.

If it works, open http://localhost:8080/ to check it, then publish stream by:

# Or by FFmpeg docker
docker run --rm --network=host registry.cn-hangzhou.aliyuncs.com/ossrs/srs:encoder \
  ffmpeg -re -i ./doc/source.200kbps.768x320.flv -c copy \
      -f flv -y rtmp://localhost/live/livestream

Note: If WebRTC enabled, you can publish by H5.

Play the following streams by players:

The online demos and players are available on ossrs.net.

Config

The config of docker is /usr/local/srs/conf/srs.conf, and logging to console.

To overwrite the config by /path/of/yours.conf:

docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \
    -v /path/of/yours.conf:/usr/local/srs/conf/srs.conf \
    ossrs/srs:4

Note: How to config SRS, please read wiki(CN/EN).

Winlin 2019.11

About

The docker for development environment for SRS.

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •