SRS supports SRT configuration instructions

SRS 4.0 has fully supported SRT's push and pull streams and conversion to RTMP streams. Streaming media transmission with low latency and high image quality can now be deployed on cloud servers for multiple purposes.

1. First, you need to configure the library for compiling SRT. For the source code and wiki, please refer to https://github.com/Haivision/srt. The
official installation tutorial is as follows:

sudo yum update
sudo yum install tcl pkgconfig openssl-devel cmake gcc gcc-c++ make automake
./configure
make
make install

After configuration, the default directory is /usr/local/lib64

2. You need to configure and compile the SRS library. See
https://github.com/ossrs/srs
for the source code and wiki and select SRS4.0 to download

You need to specify the libsrt dynamic library path before installing SRS:

export LD_LIBRARY_PATH=/usr/local/lib64

Then execute in the trunk directory of SRS4.0:

ll /usr/local/lib64/libsrt.*

In order to solve the situation that libsrt cannot find openssl, you need to configure:

./configure --with-srt --use-sys-ssl

Next

make && make install

Installed. Run the command as follows:

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

3. SRT live broadcast address format The
key method is to clarify the role of url through the streamid parameter. The format of strreamid conforms to the YAML format.

srt regular address (no vhost)
srt url example:

Streaming address: srt://127.0.0.1:10080?streamid=#!::h=live/livestream,m=publish
Streaming address: srt://127.0.0.1:10080?streamid=#!::h =live/livestream,m=request

among them:

  1. #!::
    #!:: is the beginning, in line with the yaml format standard
  2. h is
    mapped to appname/streamname in the rtmp address;
  3. m
    publish means push stream.
    request means pull flow.

The rtmp streaming address corresponding to the above srt is: rtmp://127.0.0.1/live/livestream

Guess you like

Origin blog.csdn.net/weixin_42550813/article/details/113106116