Skip to main content
Version: 7.0 (Unstable) 🚧

Build

You can build SRS from source code, but docker is highly recommend.

Live Streaming

SRS supports live streaming.

Get SRS source, recommend Ubuntu20:

git clone -b develop https://github.com/ossrs/srs.git

Build SRS in srs/trunk:

cd srs/trunk
./configure
make

Run SRS server:

./objs/srs -c conf/srs.conf

Check SRS by http://localhost:8080/ or:

# Check the process status
./etc/init.d/srs status

# Check the SRS logs
tail -n 30 -f ./objs/srs.log

Publish stream by FFmpeg or OBS :

ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream

Note: The file ./doc/source.flv is under the source repository of SRS.

Play stream by:

WebRTC

SRS supports WebRTC for video chat.

Get SRS source, recommend Ubuntu20:

git clone -b develop https://github.com/ossrs/srs.git

Build SRS in srs/trunk:

cd srs/trunk
./configure
make

Run SRS server:

CANDIDATE="192.168.1.10"
./objs/srs -c conf/srs.conf

Note: Please replace the IP with your server IP.

Note: About CANDIDATE, please read CANDIDATE

Check SRS by http://localhost:8080/ or:

# Check the process status
./etc/init.d/srs status

# Check the SRS logs
tail -n 30 -f ./objs/srs.log

If SRS runs on localhost, push stream to SRS by WebRTC: Publish

Note: If not localhost, browser(WebRTC) requires HTTPS, please see WebRTC using HTTPS for detail.

Play stream of SRS by WebRTC: Play

Note: If use different streams, you're able to do video chat application.

WebRTC for Live Streaming

SRS supports converting live streaming to WebRTC.

Get SRS source, recommend Ubuntu20:

git clone -b develop https://github.com/ossrs/srs.git

Build SRS in srs/trunk:

cd srs/trunk
./configure
make

Run SRS server:

CANDIDATE="192.168.1.10"
./objs/srs -c conf/rtmp2rtc.conf

Note: Please replace the IP with your server IP.

Note: About CANDIDATE, please read CANDIDATE

Note: If convert RTMP to WebRTC, please use rtmp2rtc.conf

Publish stream by FFmpeg or OBS :

ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream

Note: The file ./doc/source.flv is under the source repository of SRS.

Play stream by:

WebRTC using HTTPS

If not localhost, for example, to view WebRTC on pad or mobile phone, when SRS is running on remote server.

Get SRS source, recommend Ubuntu20:

git clone -b develop https://github.com/ossrs/srs.git

Build SRS in srs/trunk:

cd srs/trunk
./configure
make

Run SRS server:

CANDIDATE="192.168.1.10"
./objs/srs -c conf/https.rtc.conf

Note: Please replace the IP with your server IP.

Note: About CANDIDATE, please read CANDIDATE

Remark: Please use your HTTPS key and cert file, please read HTTPS API and HTTPS Callback and HTTPS Live Streaming, however HTTPS proxy also works perfect with SRS such as Nginx.

Push stream to SRS by WebRTC: Publish

Play stream of SRS by WebRTC: Play

Note: For self-sign certificate, please type thisisunsafe to accept it.

Note: If use different streams, you're able to do video chat application.

Cross Build

Normally you're able to build SRS on both ARM or MIPS servers.

If need to cross-build SRS for embed devices, pelase read ARM and CrossBuild.