ustreamer

This commit is contained in:
devdatt 2025-12-07 21:24:40 +05:30
parent daa4c38fd4
commit 4b5822c324
1 changed files with 3 additions and 3 deletions

View File

@ -59,8 +59,8 @@ function update_service($which_service)
switch ($input_source) { switch ($input_source) {
case "hdmi": case "hdmi":
$input = "ffmpeg -hwaccel auto -hide_banner -f v4l2 -thread_queue_size 512 -input_format mjpeg -framerate " . $data['hdmi']['framerate'] . " -video_size " . $data['hdmi']['resolution'] . " -i /dev/video0 " . $input = "ustreamer --device /dev/video0 --format MJPEG --resolution " . $data['hdmi']['resolution'] . " -f " . $data['hdmi']['framerate'] .' --workers 3 --host 0.0.0.0 --port 9090 &';
"-f alsa -i " . $data['hdmi']['audio_source']; $input .= "ffmpeg -i http://127.0.0.1:9090/stream -f alsa -i " . $data['hdmi']['audio_source'] ;
break; break;
case "url": case "url":
$input .= "ffmpeg -hide_banner -stream_loop -1 -re -i " . $data['url']; $input .= "ffmpeg -hide_banner -stream_loop -1 -re -i " . $data['url'];
@ -208,7 +208,7 @@ function update_service($which_service)
switch ($which_service) { switch ($which_service) {
case 'input': case 'input':
$input .= " -c:v copy -c:a aac -b:a 128k -f matroska udp://@239.255.254.254:39000?localaddr=127.0.0.1"; $input .= " -c:v copy -c:a aac -b:a 128k -f udp://@239.255.254.254:39000?localaddr=127.0.0.1&ttl=1";
$service = $input; $service = $input;
$file = "/var/www/encoder-main.sh"; $file = "/var/www/encoder-main.sh";
if (file_put_contents($file, $service) !== false) { if (file_put_contents($file, $service) !== false) {