admin管理员组

文章数量:1659330

首先需要下载nginx和nginx rtmp模块

nginx: https://github/nginx/nginx
nginx rtmp: https://github/arut/nginx-rtmp-module
指定nginx rtmp编译

nignx./configure --add-module=/path/to/nginx-rtmp-module
make

make install

默认nginx目录在/usr/local/nginx下

配置/usr/local/nginx/conf/nginx.conf

#user nobody;

worker_processes 1;

error_log logs/error.log;

#error_log logs/error.log notice;

#error_log logs/error.log info;

pid logs/nginx.pid;

events {

worker_connections  1024;

}

rtmp_auto_push on;

rtmp {

server {

    listen 1688;

    application push {

        live on;

         #iqiyi



        push 奇艺推播地址/开播码;

        #huya

        push rtmp://ws.upstream.huya虎牙推播地址;

    }

}

}

启动nignx后,在OBS中设置推流地址为nginx地址就可以开播了例如 rtmp://127.0.0.1:1688/push

这样就可以一次在多个平台同时直播了!

本文标签: 虎牙Nginx爱奇艺