Skip to content

Commit

Permalink
record: handle custom RTSP endpoint names.
Browse files Browse the repository at this point in the history
  • Loading branch information
themactep committed Nov 24, 2024
1 parent bf63b36 commit 1905804
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package/prudynt-t/files/record
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ show_help() {
Where params are:
-u <string> RTSP username
-p <string> RTSP password
-e <int> RTSP endpoint
-h <int> Frame height
-w <int> Frame width
-f <int> Frames per second
Expand All @@ -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" ;;
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 1905804

Please sign in to comment.