nginx-rtmp pullテスト 長時間リアルタイム配信

未分類

本ページは広告が含まれています。気になる広告をクリック頂けますと、サーバ運営費になります(^^

どうやっても、長時間の配信状況が改善しない状況から、pullに変えてみる。
そしたら少しはどうにかなるかな。

https://www.techlive.tokyo/archives/1401

エンコーダ ⇒LAN⇒ |nginx rtmp1| ⇐ Internet ⇐ |nginx rtmp2| ⇒ |Play Browser|

LAN内で一度配信し、それをnginx rtm2からpullさせる。

nginx rtmp1の設定
rtmp {
server {
listen 1935;
buflen 30s;
drop_idle_publisher 5s;
publish_notify on;
notify_method get;

access_log logs/rtmp_access.log combined;

application live {
live on;
#youtubeへのpushは続ける
push rtmp://youtube_address/live2/**************;
}
}

nginx rtmp2の設定
rtmp {
server {
listen 1935;
buflen 30s;
drop_idle_publisher 5s;
publish_notify on;
notify_method get;

access_log logs/rtmp_access.log combined;

application live {
live on;
pull rtmp://nginx_rtmp1_ip_address/live/test;
on_play http://localhost:8080/on_play;
}
}

HTMLも配信ポイントに合わせて変更。on_publishが入っているとうまく再生されない事があったのでとりあえず削除。on_playはうまく効いている。セキュアリンクでうまくいけてる。

Webブラウザで表示さておき、切れないかを確認する。

夜中中、ずっとエンコードさせてみた。やっぱり切れてた。pullにしても効果なし。配信ビットレートは512kbps。

relayしているrtmp-moduleのログ
2017/01/17 20:06:22 [info] 1752#0: *4 disconnect, client: sakura_server, server: 0.0.0.0:1935
2017/01/17 23:28:49 [info] 1752#0: *3 disconnect, client: a.rtmp.youtube.com/live2/*************, server: ngx-relay
2017/01/18 07:29:37 [info] 1752#0: *5 disconnect, client: cloudn_server, server: 0.0.0.0:1935

3つのサーバとも切断時間はバラバラ

さくらに向け同じ時間帯にping 綺麗にロスなし。
PING sakura.hoge.jp (sakura_server) 56(84) bytes of data.
64 bytes from sakura_server: icmp_seq=1 ttl=51 time=17.6 ms
64 bytes from sakura_server: icmp_seq=2 ttl=51 time=16.1 ms
64 bytes from sakura_server: icmp_seq=3 ttl=51 time=15.9 ms
64 bytes from sakura_server: icmp_seq=4 ttl=51 time=15.8 ms
64 bytes from sakura_server: icmp_seq=5 ttl=51 time=16.3 ms

Cloudnに向け同じ時間帯にping 綺麗にロスなし。
PING video.hoge.jp (cloudn_server) 56(84) bytes of data.
64 bytes from cloudn_server: icmp_seq=1 ttl=54 time=13.5 ms
64 bytes from cloudn_server: icmp_seq=2 ttl=54 time=13.5 ms
64 bytes from cloudn_server: icmp_seq=3 ttl=54 time=12.9 ms
64 bytes from cloudn_server: icmp_seq=4 ttl=54 time=12.9 ms

くぅ。

めげないぞぉ。

タイトルとURLをコピーしました