Skip to content

Instantly share code, notes, and snippets.

@pfeerick
Last active September 16, 2022 08:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfeerick/30bae57acb046232b8c0e2159935987e to your computer and use it in GitHub Desktop.
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
#!/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"
#!/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