Dies ist eine alte Version des Dokuments!
Linux Timelapse
mit Motion
changes in motion conf
videodevice /dev/video1 width 1280 height 720 quality 90 target_dir /tmp/motion snapshot_filename %s webcam_port 0 control_port 0
Create Timelapse Video
# change to motion storage cd /tmp/motion # create temp dir if not exists if [ ! -d "./tmp/" ]; then mkdir ./tmp/ fi # clear temp dir rm ./tmp/* # copy all captured images to temp dir, an rename it to 00000.jpg x=1; for i in *.jpg; do counter=$(printf %06d $x); cp "$i" ./tmp/img"$counter".jpg; x=$(($x+1)); done # acvonv=ffmpeg avconv -r 30 -i ./tmp/img%06d.jpg -s hd720 -vcodec libx264 time-lapse.mp4 # clear temp dir rm ./tmp/*
Live Image in Browser
<html> <body> <style> * { box-sizing: border-box; } html, body, iframe { height: 100%; width: 100%; margin: 0; padding: 0; } img { max-width: 100%; max-height: 100%; } </style> <img id="last"/> <script> function setLastImg() { document.getElementById('last').src = "file:///tmp/motion/lastsnap.jpg?" + new Date().getTime(); } setLastImg(); setInterval(setLastImg, 1000); </script> </body> </html>