Created
October 13, 2023 08:28
-
-
Save markjenkins/c836d783fafe52d996ac8546c7565b23 to your computer and use it in GitHub Desktop.
IQ511 record mjpeg avi to cronolog
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
#!/bin/sh | |
# for IQ511 | |
# $1 is the last octet of the ipv4 address | |
# created files are not cleaned up | |
# regarding /now.jpg urls | |
# snap=spush0.25 means camera push a frame every 0.25 seconds | |
# ds=2 downsample by a factor of 2 (half size) | |
# | |
# ffmpeg flags | |
# reduce noise | |
# -hide_banner -loglevel error | |
# | |
# -i # input url | |
# -r 4 # stream we're working with is 4fps | |
# -c:v copy # just copy, don't re-encode | |
# -f avi # output format avi | |
# pipe:1 # standard out as the target | |
# | |
# cronolog is creating log files every two hours | |
cd /srv/tmprecordings/mark | |
/usr/bin/ffmpeg -hide_banner -loglevel error -i \ | |
"http://192.168.1.$1/now.jpg?snap=spush0.25&ds=2" \ | |
-r 4 -c:v copy -f avi pipe:1 | \ | |
/usr/bin/cronolog -p "2 hours" \ | |
"/srv/tmprecordings/mark/$1/%Y-%m-%d/%Y-%m-%d-%H-%M-%S.avi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment