Former-commit-id: b45377de97a8b31ff23edb75695a5c4e15878ffc
Former-commit-id: da1c3d37154683b22e3fcf1b36aed1b43bae7348
1.0
wanggang 4 years ago
parent 9a7bed173d
commit 9abcaf4c6c

@ -16,6 +16,11 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server { server {
listen 0.0.0.0:81; listen 0.0.0.0:81;
server_name localhost; server_name localhost;
@ -58,18 +63,12 @@ http {
location ^~ /platform/ { location ^~ /platform/ {
proxy_pass http://platform/platform/; proxy_pass http://platform/platform/;
} if ($http_upgrade ~* "close") {
break;
location ^~ /platform/hub { }
proxy_pass http://platform/platform/hub;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
} }
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
} }
} }

@ -16,16 +16,20 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server { server {
listen 0.0.0.0:80; listen 0.0.0.0:80;
server_name localhost; server_name localhost;
location /platform/ { location /platform/ {
proxy_pass http://host.docker.internal:8011/platform/; proxy_pass http://host.docker.internal:8011/platform/;
} if ($http_upgrade ~* "close") {
break;
location ^~ /platform/hub { }
proxy_pass http://host.docker.internal:8011/platform/hub;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

@ -22,9 +22,9 @@ stats {
network 0; network 0;
disk sda sdb xvda xvdb; disk sda sdb xvda xvdb;
} }
rtc_server { rtc_server{
enabled on; enabled on;
listen 8000; listen 8000;
candidate *; candidate *;
} }
vhost __defaultVhost__ { vhost __defaultVhost__ {
@ -32,11 +32,12 @@ vhost __defaultVhost__ {
enabled on; enabled on;
bframe discard; bframe discard;
} }
tcp_nodelay on min_latency on; tcp_nodelay on
min_latency on;
play { play {
gop_cache off; gop_cache off;
queue_length 10; queue_length 10;
mw_latency 100; mw_latency 100;
} }
publish { publish {
mr off; mr off;
@ -59,23 +60,26 @@ vhost __defaultVhost__ {
output ./objs/nginx/html/[app]/[stream].png; output ./objs/nginx/html/[app]/[stream].png;
} }
engine ff { engine ff {
enabled off; enabled off;
vfilter; vfilter {
vcodec libx264; }
vbitrate 500; vcodec libx264;
vfps 25; vbitrate 500;
vwidth 768; vfps 25;
vheight 320; vwidth 768;
vthreads 12; vheight 320;
vprofile main; vthreads 12;
vpreset medium; vprofile main;
vparams; vpreset medium;
acodec libfdk_aac; vparams {
abitrate 70; }
asample_rate 44100; acodec libfdk_aac;
achannels 2; abitrate 70;
aparams; asample_rate 44100;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; achannels 2;
aparams {
}
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
} }
} }
http_remux { http_remux {

@ -16,6 +16,11 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream proxy { upstream proxy {
server gateway:81; server gateway:81;
} }
@ -35,10 +40,9 @@ http {
location ~* ^/(platform|dfs|live|video|influxdb|portainer|minio|mysqlui|influxui|phpredisadmin|srs)/ { location ~* ^/(platform|dfs|live|video|influxdb|portainer|minio|mysqlui|influxui|phpredisadmin|srs)/ {
proxy_pass http://proxy; proxy_pass http://proxy;
} if ($http_upgrade ~* "close") {
break;
location ^~ /platform/hub { }
proxy_pass http://proxy;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

Loading…
Cancel
Save