一、首先安装nginx
请看:https://blog.csdn.net/feixiangsmile/article/details/105881238
我们不使用默认的80端口,配置端口为8079,别忘了防火墙配置放行
二、SRS
SRS官方部署配置说明为https://github.com/ossrs/srs/wiki/v3_CN_SampleHLS
我总结如下
1、下载编译
git clone https://github.com/ossrs/srs
cd srs/trunk
./configure && make
2、编写配置文件
srs/trunk/config目录下有很多配置文件,其中有一个hls.conf
打开配置如下,http_server必须存在,不然obs studio推送流的时候连接不到服务器。不知道为什么,请高手指教。注意:1935端口同样需要配置防火墙放行
# conf/hls.conf
listen 1935;
max_connections 1000;
http_server {
#使用默认就可以了,不需要写其他的。
}
vhost __defaultVhost__ {
hls {
enabled on;
#/usr/local/nginx/html是我们自己nginx的项目目录
hls_path /usr/local/nginx/html;
hls_f