1.推拉流

前提:

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容