revert 'improve nginx rtmp routing'

This commit is contained in:
Geno 2020-12-09 11:24:22 +01:00
parent 193deacf3d
commit fde33a766a
1 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@ rtmp {
#deny publish all;
allow play ::1;
allow play 127.0.0.1;
deny play all;
deny play all;
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-key;
on_publish_done http://127.0.0.1:{{ osp_worker_start_port }}/deauth-user;
@ -28,11 +28,11 @@ rtmp {
#deny publish all;
allow play ::1;
allow play 127.0.0.1;
deny play all;
deny play all;
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-user;
push rtmp://127.0.0.1:1935/live/$name;
push rtmp://127.0.0.1:1935/record/$name;
push rtmp://127.0.0.1:1935/live/;
push rtmp://127.0.0.1:1935/record/;
hls on;
hls_path {{ osp_http_path }}/live;
@ -63,10 +63,10 @@ rtmp {
deny play all;
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-user;
push rtmp://127.0.0.1:1935/live/$name;
push rtmp://127.0.0.1:1935/record/$name;
push rtmp://127.0.0.1:1935/live/;
push rtmp://127.0.0.1:1935/record/;
exec ffmpeg -i rtmp://127.0.0.1:1935/stream-data-adapt/$name
exec ffmpeg -i rtmp://127.0.0.1:1935/live/$name
-c:v libx264 -c:a aac -b:a 192k -vf "scale=-2:1080" -vsync 1 -copyts -start_at_zero -sws_flags lanczos -r 30 -g 30 -keyint_min 30 -force_key_frames "expr:gte(t,n_forced*1)" -tune zerolatency -preset ultrafast -crf 28 -maxrate 4192k -bufsize 8384k -threads 4 -f flv rtmp://127.0.0.1:1935/show/$name_1080
-c:v libx264 -c:a aac -b:a 128k -vf "scale=-2:720" -vsync 1 -copyts -start_at_zero -sws_flags lanczos -r 30 -g 30 -keyint_min 30 -force_key_frames "expr:gte(t,n_forced*1)" -tune zerolatency -preset ultrafast -crf 28 -maxrate 2096k -bufsize 4192k -threads 4 -f flv rtmp://127.0.0.1:1935/show/$name_720
-c:v libx264 -c:a aac -b:a 96k -vf "scale=-2:480" -vsync 1 -copyts -start_at_zero -sws_flags lanczos -r 30 -g 30 -keyint_min 30 -force_key_frames "expr:gte(t,n_forced*1)" -tune zerolatency -preset ultrafast -crf 28 -maxrate 1200k -bufsize 2400k -threads 4 -f flv rtmp://127.0.0.1:1935/show/$name_480;