The docker images for SRS.
By default, ossrs/srs:3
is the latest SRS3 image,
others is here such as ossrs/srs:v3.0-r3.
Run SRS in docker by:
docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3
# Or, for developers in China to speedup.
docker run --rm -p 1935:1935 -p 1985:1985 -p 8080:8080 \
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:3
If it works, open http://localhost:8080/ to check it, then publish stream by:
ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy \
-f flv rtmp://localhost/live/livestream
# 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
Play the following streams by players:
- VLC(RTMP): rtmp://localhost/live/livestream
- H5(HTTP-FLV): http://localhost:8080/live/livestream.flv
- H5(HLS): http://localhost:8080/live/livestream.m3u8
The online demos and players are available on ossrs.net.
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:3
Winlin 2019.11