使用nginx分流虎牙愛奇藝同時直播

首先須要下載nginx和nginx rtmp模塊nginx

nginx: https://github.com/nginx/nginx
nginx rtmp: https://github.com/arut/nginx-rtmp-module
指定nginx rtmp編譯git

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

make installapp

默認nginx目錄在/usr/local/nginx下ide

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

#user nobody;server

worker_processes 1;直播

error_log logs/error.log;it

#error_log logs/error.log notice;io

#error_log logs/error.log info;

pid logs/nginx.pid;

events {

worker_connections  1024;1

}

rtmp_auto_push on;

rtmp {

server {

    listen 1688;

    application push {

        live on;

         #iqiyi



        push 奇藝推播地址/開播碼;

        #huya

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

    }

}123456789101112131415161718192021

}

啓動nignx後,在OBS中設置推流地址爲nginx地址就能夠開播了例如 rtmp://127.0.0.1:1688/push

這樣就能夠一次在多個平臺同時直播了!

相關文章
相關標籤/搜索