Last active
September 16, 2022 08:29
-
-
Save pfeerick/30bae57acb046232b8c0e2159935987e to your computer and use it in GitHub Desktop.
Scripts to capture and generate timelapse footage from Maginon IPC-100 IP camera
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/bash | |
USERNAME="" | |
PASSWORD="" | |
URL="http://192.168.0.156/snapshot.jpg?user=${USERNAME}&pwd=${PASSWORD}" | |
TIMESTAMP=$(date +%F_%T) | |
OUTPUT_DIR="/home/rock64/ipcam-snapshots" | |
curl "${URL}" --output "${OUTPUT_DIR}/${TIMESTAMP}.jpg" |
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/bash | |
INPUT_MASK="/home/rock64/ipcam-snapshots/*.jpg" | |
OUTPUT_FILE="/home/rock64/timelapse.mp4" | |
ffmpeg -r 24 -pattern_type glob -i "${INPUT_MASK}" -vcodec libx264 "${OUTPUT_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment