1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-03 13:12:44 +02:00

Fix recording script when RTSP port has been changed from default of 8554 (#1287)

This commit is contained in:
Ben Russell
2020-02-23 01:51:51 +00:00
committed by GitHub
parent 39e175b010
commit 251ab02384

View File

@@ -1,6 +1,8 @@
#!/bin/sh
PIDFILE="/run/recording.pid"
DCIM_PATH="/system/sdcard/DCIM"
PORT=8554
if [ -f /system/sdcard/config/rtspserver.conf ]; then
. /system/sdcard/config/rtspserver.conf
fi
@@ -39,7 +41,7 @@ start()
do
sleep 1
done
/system/sdcard/bin/busybox nohup /system/sdcard/bin/avconv -flags low_delay -fflags nobuffer -probesize 32 -i rtsp://"$CREDENTIALS"0.0.0.0:8554/unicast -strict experimental -y -vcodec copy -an $RECORDING_PATH &>/dev/null &
/system/sdcard/bin/busybox nohup /system/sdcard/bin/avconv -flags low_delay -fflags nobuffer -probesize 32 -i rtsp://"$CREDENTIALS"0.0.0.0:$PORT/unicast -strict experimental -y -vcodec copy -an $RECORDING_PATH &>/dev/null &
echo "$!" > "$PIDFILE"
fi
}