From fde33a766a4b23c5d99f2be20d4478f6669e71a1 Mon Sep 17 00:00:00 2001 From: Geno Date: Wed, 9 Dec 2020 11:24:22 +0100 Subject: [PATCH] revert 'improve nginx rtmp routing' --- templates/osp-rtmp.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/osp-rtmp.conf b/templates/osp-rtmp.conf index a4002ff..541caa3 100644 --- a/templates/osp-rtmp.conf +++ b/templates/osp-rtmp.conf @@ -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;