srs streaming server + obs streaming (simple)

1- Build a virtual machine locally

#Because there was a virtual machine before, so here is a direct clone, if not, create a new one

# Because this is mainly about srs + obs, how to install a new virtual machine and use remote tools to connect to linux is skipped here

# If the picture below is not clear, you can click on the picture to enlarge it


2- Check if git is installed

# I am using centos7 here, the system does not have git installed by default, so I need to install it here

# Why install git? Because we will pull srs from git later, we need git

# Check git command ---> git -v

# Install git command ---> yum -y install git



3- Download srs

# After installing git, we need to download srs 

# Go directly to the official introduction   v3_CN_Home · ossrs/srs Wiki · GitHub 

# Then follow the official operation

git clone -b 3.0release https://gitee.com/ossrs/srs.git

# Download srs to our local through the qualified command


4- Compile and install

# After downloading, we need to compile and install srs

1-首先我们切换到trunk文件夹    cd srs/trunk

2-执行没命令编译安装        ./configure && make

3-接下来所有操作都将在 trunk 目录下完成 


5- Modify the configuration file

1-使用 vi conf/srs.conf 来修改配置文件

# Remember to compile again after modification


6- Close the firewall or open the port

# Here we need to close our firewall or open the corresponding port, otherwise we will not be able to access through the address

# I will directly close the firewall here, and you can search for the way to open the port

# systemctl stop firewalld Use this command to turn off the firewall


7- Start the srs service

1 使用这个命令启动      ./objs/srs -c conf/srs.conf

2 查看SRS的状态        ./etc/init.d/srs status

3 或者看SRS的日志       tail -f ./objs/srs.log

4 停止                  ./etc/init.d/srs stop

5 重启                 ./etc/init.d/srs restart


8-Use obs for streaming




 9- Access the srs server


10-Test pull flow

# Stream address   http://192.168.126.130:8080/live/111.m3u8

# The format is: http://+ip+port+the stream password just set by obs+ .m3u8

Guess you like

Origin blog.csdn.net/qq_52514123/article/details/124845005