遠隔拠点間のライブ中継3
前回 主なライブ中継の構成について
今回は各PCの設定について記述します
①配信PC サーバーは自分自身を設定、ストリームキーは任意です「livekey」
前回ダウンロードした、Nginx+Rtmpwindows版ビルドを、c:\直下へ配置し、起動する
以下の記事の後半に記述してあります
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;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /hls {
#server hls fragments
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias temp/hls;
expires -1;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 4096;
#access_log /var/log/rtmp_access.log;
application live {
live on;
record off;
}
application hls {
live on;
hls on;
hls_path temp/hls;
hls_fragment 1s;
}
}
}
とりあえず、ポート8080、配信形式をhlsで1秒配信としました。
以下が参考になります。
他のコンパイル済み、Nginxの入手方法がありますが、中華製なのでやめました
OBSで設定した画面が①配信PCのc:\Nginx内のtemp/hls内に蓄積されます
この時点で③ライブ配信PCより①配信PCのIPアドレスへアクセスすると、中継されます
<http://【①の配信PCのIPアドレス】:8080/index-hls.html>
さらに②再配信PCについては次回に記述します