From 1905804f1df840aab37c6659fa22bac6c1a77722 Mon Sep 17 00:00:00 2001 From: Paul Philippov Date: Sun, 24 Nov 2024 08:03:58 -0500 Subject: [PATCH] record: handle custom RTSP endpoint names. --- package/prudynt-t/files/record | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/prudynt-t/files/record b/package/prudynt-t/files/record index a5a589d2e..aab6ee37c 100755 --- a/package/prudynt-t/files/record +++ b/package/prudynt-t/files/record @@ -22,6 +22,7 @@ show_help() { Where params are: -u RTSP username -p RTSP password + -e RTSP endpoint -h Frame height -w Frame width -f Frames per second @@ -43,9 +44,12 @@ else [ "${#1}" -eq 0 ] && die "Config file $RECORD_WEBUI_CONF not found" fi -while getopts "d:f:h:lm:n:p:t:u:v:w:xz:" flag; do +rtsp_endpoint="ch0" + +while getopts "d:e:f:h:lm:n:p:t:u:v:w:xz:" flag; do case "$flag" in d) record_diskusage=$OPTARG ;; + e) rtsp_endpoint=$OPTARG ;; f) stream0_fps=$OPTARG ;; h) stream0_height=$OPTARG ;; l) record_loop="true" ;; @@ -122,7 +126,7 @@ while :; do fi echo "Running openRTSP -u $rtsp_username $rtsp_password -w $stream0_width -h $stream0_height" \ - "-f $stream0_fps -d $record_duration $vformat -b 1048576 -t rtsp://127.0.0.1/ch0 > $parsed_target" + "-f $stream0_fps -d $record_duration $vformat -b 1048576 -t rtsp://127.0.0.1/$rtsp_endpoint > $parsed_target" openRTSP -u $rtsp_username $rtsp_password -w $stream0_width -h $stream0_height -f $stream0_fps \ -d $record_duration $vformat -b 1048576 -t rtsp://127.0.0.1/ch0 > $parsed_target 2> /dev/null