From a53598cfb6a94aee6b7f33ab31cd8cc69688d97c Mon Sep 17 00:00:00 2001 From: John Call Date: Fri, 24 Apr 2020 10:19:09 -0600 Subject: [PATCH 1/2] Update README.md Thank you for sharing this script! It worked very well for me. I made a small edit to your example so that it would include the "createvideo" argument. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7151cb..8bd9238 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,6 @@ This example is crontab to save an image every minute Then every time you want to make a video, simply execute ``` -unifi-timelapse.sh “camera name” today +unifi-timelapse.sh createvideo “camera name” today ``` That will create a time-lapse of all todays images. Options are `today` `yesterday` `all` `file` hopefully that’s self explanatory. The `file` option should be a text file with a list of the images you want included, one per line. From c7c7fd55916a0daae8917881d7e9b9c94f4365ed Mon Sep 17 00:00:00 2001 From: John Call Date: Sun, 10 May 2020 13:01:00 -0600 Subject: [PATCH 2/2] Replace wget with curl When wget fails to download a picture it still creates a 0-byte file because of the "-O" option. Replacing wget with curl prevents 0-byte files from being created. --- unifi-timelapse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unifi-timelapse.sh b/unifi-timelapse.sh index 6ad363e..2f9b7c8 100755 --- a/unifi-timelapse.sh +++ b/unifi-timelapse.sh @@ -47,7 +47,7 @@ getSnap() { log savingSnap "$2" to "$snapFile" - wget --quiet -O "$snapFile" "$2" + curl --silent --show-error --connect-timeout 10 -o "$snapFile" "$2" } createMovie()