Archive for Oktober 26th, 2014

Raspberry Pi – creating time lapse videos with mencoder

Sonntag, Oktober 26th, 2014

raspberrypi_logo.jpg   To create a time-lapse video, you simply configure the Raspberry Pi to take a picture at a regular interval, such as every minute, then use an application to stitch the pictures together in a video

# apt-get install mencoder
# vi /usr/local/bin/stream/make_stream.sh
#!/bin/bash
DATE=$(date +“%Y-%m-%d_%H%M“)
cp /tmp/stream/pic.jpg /tmp/stream/$DATE.jpg
# crontab -e
* * * * * /usr/local/bin/stream/make_stream.sh 2>&1
# vi /usr/local/bin/stream/make_timplapse.sh 
#!/bin/bash
cd /tmp/stream/
DATE=$(date +“%Y-%m-%d“)
ls $DATE*.jpg > stills.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt