use_common_backend

This commit is contained in:
devdatt 2025-12-19 18:47:17 +05:30
parent 016f36871c
commit ad09791a56
2 changed files with 12 additions and 3 deletions

View File

@ -87,9 +87,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if($new['use_common_backend']=='transcode_every_time'){ if($new['use_common_backend']=='transcode_every_time'){
switch($new['input']){ switch($new['input']){
case 'rtmp':
$new['rtmp']['password']="bhattji";
break;
case 'srt': case 'srt':
$new['srt']['stream_id_3']="ji"; $new['srt']['stream_id_3']="ji";
break; break;

View File

@ -848,6 +848,7 @@ function update_service_backend($service)
if (!is_array($data)) $data = $defaults; if (!is_array($data)) $data = $defaults;
} }
$use_common_backend = $data['use_common_backend'];
$input_source = $data['input']; $input_source = $data['input'];
$input_rtmp_mount = $data['rtmp']['mount']; $input_rtmp_mount = $data['rtmp']['mount'];
$srt_pass1 = $data['srt']['stream_id_1']; $srt_pass1 = $data['srt']['stream_id_1'];
@ -1044,6 +1045,11 @@ function update_service_backend($service)
} }
} }
$rtmp_input_copy = "";
if ($use_common_backend == 'transcode_every_time') {
$rtmp_input_copy = "push rtmp://127.0.0.1/shree/bhattji;";
}
$nginx = " $nginx = "
user www-data; user www-data;
worker_processes auto; worker_processes auto;
@ -1069,6 +1075,9 @@ rtmp {
record off; record off;
meta off; meta off;
wait_video on; wait_video on;
deny play all;
allow publish all;
" . $rtmp_input_copy . "
} }
"; ";
@ -1080,6 +1089,9 @@ rtmp {
record off; record off;
meta off; meta off;
wait_video on; wait_video on;
allow publish 127.0.0.1;
deny publish all;
allow play all;
" . $hls0 . " " . $hls0 . "
" . $dash0 . " " . $dash0 . "