tools/ipcam_capture: spaces to tabs and support other extensions
This commit is contained in:
parent
2a761a7261
commit
cbd8824e61
@ -8,6 +8,7 @@ DEBUG=0
|
||||
CHANNEL=1
|
||||
FORCE_UDP=0
|
||||
FORCE_TCP=0
|
||||
EXTENSION="mp4"
|
||||
|
||||
die() {
|
||||
echo >&2 "error: $@"
|
||||
@ -72,6 +73,14 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--mov)
|
||||
EXTENSION="mov"
|
||||
;;
|
||||
|
||||
--mpv)
|
||||
EXTENSION="mpv"
|
||||
;;
|
||||
|
||||
*)
|
||||
die "Unrecognized argument: $1"
|
||||
;;
|
||||
@ -107,4 +116,4 @@ fi
|
||||
|
||||
ffmpeg $args -i rtsp://${CREDS}${IP}:${PORT}/Streaming/Channels/${CHANNEL} \
|
||||
-c copy -f segment -strftime 1 -segment_time 00:10:00 -segment_atclocktime 1 \
|
||||
"$OUTDIR/record_%Y-%m-%d-%H.%M.%S.mp4"
|
||||
"$OUTDIR/record_%Y%m-%d-%H.%M.%S.${EXTENSION}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user