im running this script every 30 seconds via crontab
Code: Select all
#!/bin/bash
cd /srv/ftp/webcam
convert "$(ls -t *.jpg | head -1)" -crop 2560x1440+128+0 +repage /home/timelapse/webcam.png
convert /home/timelapse/webcam.png -chop 0x70 -background "#000000" -flatten -splice 0x70 -gravity NorthWest -fill white -font DejaVu-Sans -pointsize 35 -annotate +30+16 'www.gaestehaus-kleinwalsertal.de' -gravity NorthEast -fill white -font DejaVu-Sans -pointsize 35 -annotate +25+16 "$(date +"%d.%m.%y - %H:%M Uhr")" /home/timelapse/webcam1.png
composite -geometry +40+85 /home/logos/logo.png /home/timelapse/webcam1.png /home/timelapse/webcam2.png
composite -geometry +2460+85 /home/logos/kwt.png /home/timelapse/webcam2.png /home/timelapse/webcam3.png
composite -geometry +500+85 /home/logos/bbt.png /home/timelapse/webcam3.png /home/timelapse/$(date +%d.%m.%y_%H:%M:%S).jpg
rm /home/timelapse/*.png
every 30 seconds it grabs the latest webcam picture and adds some logos, url and the date, it works most of the time,
but sometimes the picture is cut in half like this one
the original photos from the webcam are 100% ok
i use the pictures to make a timelapse and the corrupted images are not looking good in the final video.
there are some days without any corruptions and there are days with dozens of them.
hope you can give me some advice