Created
May 28, 2019 19:05
-
-
Save PlushBeaver/dcc29e22ce74b8e7f4dd797ebe064b31 to your computer and use it in GitHub Desktop.
Record video from remote PTZ camera into chunks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adjust parameters in CAPS to your needs. | |
SEGMENT_HOURS=6 | |
RECORD_DAYS=7 | |
exec ffmpeg \ | |
-y -hide_banner -nostats -loglevel info \ | |
-i 'http://IP:PORT/videostream.cgi?user=USERNAME&pwd=PASSWORD' \ | |
-f segment -segment_time $((SEGMENT_HOURS*60*60)) -segment_wrap $((RECORD_DAYS * 24 / SEGMENT_HOURS)) -segment_atclocktime 1 \ | |
-strftime 1 \ | |
"recording_%Y-%m-%d_%H-%M.webm" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment