1.推拉流

2017-02-13  本文已影响97人  苏柏娜

前提:

1.已安装nginx

2.下载安装xtmp模块  nginx源码目录下 ./configure --add-module=/path/to/nginx-rtmp-module --with-http_ssl_module

make

sudo make install

3.启动nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

4.推拉流设置

1)./usr/local/nginx/conf/nginx.conf 文件下添加

rtmp{

server{

listen 1935;

application myapp {

live on;

record off;

}

application hls{

live on;

hls on;

hls_path /tmp/hls;

}

}

}

2).使用ffmpeg推流

ffmpeg -re -i test.mp4 -vcodec libx264 -f flv rtmp://localhost:1935/myapp/test1

3).打开obs,媒体->打开网络串流,在网络中输入URL地址

rtmp://192.168.44.131:1935/myapp/test1

上一篇 下一篇

猜你喜欢

热点阅读