Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoombar/bac4b5cbbfaea3f86be10adfe0782a53 to your computer and use it in GitHub Desktop.
Save hoombar/bac4b5cbbfaea3f86be10adfe0782a53 to your computer and use it in GitHub Desktop.
merge motion capture files from motioneye
#!/bin/bash
# Crontab: 0 18 15 * * /data/output/mergeCam.sh
DATE=`date +%Y-%m-%d`
process /data/output/Camera1/$DATE
process /data/output/Camera2/$DATE
function process {
ffmpeg -f concat -i <(for f in $1/*.mp4.thumb; do echo "file '${f%.thumb}'"; done) -c copy $WORKING_DIR/concat.mp4
for f in $WORKING_DIR/*.mp4.thumb; do echo "rm '$WORKING_DIR/${f%.thumb}'"; done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment