Linux Webcam
Live Bild
Live Image
- motion saves image every 15 seconds to
/var/www/webcam/lastsnap.jpg - this script copies
lastsnap.jpgtolive.jpg, writes a timestamp to/var/www/webcam/lastsnap.txtand sets the rights so the webserver can accesslive.jpg - index.html displays the
live.jpgand every 5 seconds thelastsnap.txtis fetched via ajax. If this timestamp changed, thelive.jpgis reloaded with cache breaker
Archiving
- crontab runs
webcam-archiv.shevery 15 minutes from 5 to 21 o'Clock - it copys the
live.jpgto thearchiv/<current-timestamp>.jpg
Zeitraffer
ffmpeg -r 30 -i input%03d.jpg -codec copy output.mkv
Die Framerate gibt -r an. Bilder müssen fortlaufend und lückenlos im Format input000.jpg bekannt sein.