From 34e7ce50478c07d635a3c9748db8e0bf3f656c28 Mon Sep 17 00:00:00 2001 From: Jurij Date: Wed, 10 May 2023 16:46:51 +0200 Subject: [PATCH] Manjsi popravki, systemd service --- 1_mjpeg2rtp.sh | 2 ++ galbot.service | 13 +++++++++++++ settings.js.primer | 1 + ustvari_wifi.sh | 2 ++ 4 files changed, 18 insertions(+) create mode 100644 galbot.service create mode 100755 ustvari_wifi.sh diff --git a/1_mjpeg2rtp.sh b/1_mjpeg2rtp.sh index 865b780..a94c87a 100755 --- a/1_mjpeg2rtp.sh +++ b/1_mjpeg2rtp.sh @@ -10,3 +10,5 @@ curl "$url" # Pretvori MJPEG v VP8 RTP stream #ffmpeg -re -stream_loop -1 -i $VIR -c:v libx264 -tune zerolatency -profile:v baseline -b:v 1M -an -f rtp $CILJ ffmpeg -threads 3 -re -fflags +genpts -stream_loop -1 -i "$VIR:81" -c:v libvpx -crf 10 -b:v 1M -an -f rtp $CILJ +# Ce ga 5 sekund ni, izhod +#ffmpeg -re -stream_loop -1 -i "$VIR:81" -shortest -c:v libvpx -b:v 1M -an -f rtp $CILJ -t 5 diff --git a/galbot.service b/galbot.service new file mode 100644 index 0000000..0406381 --- /dev/null +++ b/galbot.service @@ -0,0 +1,13 @@ +[Unit] +Description=Storitev za dekodiranje pretoka MJPEG v RTP (janus) +After=janus.service + +[Service] +User=g1smo +WorkingDirectory=/home/g1smo/galerija-bot +ExecStart=/home/g1smo/galerija-bot/1_mjpeg2rtp.sh +Restart=always +RestartSec=5s + +[Install] +WantedBy=default.target diff --git a/settings.js.primer b/settings.js.primer index 3bfe55d..6f746ac 100644 --- a/settings.js.primer +++ b/settings.js.primer @@ -18,3 +18,4 @@ var BOT="http://192.168.1.101/"; // Koliko milisekund se naj vrtijo propelerji? var DOLZINA=3000; +var PAVZA=3000; diff --git a/ustvari_wifi.sh b/ustvari_wifi.sh new file mode 100755 index 0000000..2ab8b24 --- /dev/null +++ b/ustvari_wifi.sh @@ -0,0 +1,2 @@ +#!/bin/sh +create_ap wlan0 eth0 GalBotNet spustimenotzeno --country SI --freq-band 2.4