Last active
August 29, 2015 14:10
-
-
Save wopfel/3ef099fef3687d010255 to your computer and use it in GitHub Desktop.
Raspberry Pi timelapse video (create pictures and create video). Sample values can/must be replaced.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create pictures ... | |
DESTDIR=/mnt/timelapse/series_$RANDOM && mkdir $DESTDIR && /opt/vc/bin/raspistill -o $DESTDIR/`date '+%Y-%m-%d'`_pic_%04d.jpg -t 7999000 -tl 15000 | |
# Sample picture name including path is: | |
# /mnt/timelapse/series_15554/2014-12-02_pic_0001.jpg | |
# Create video ... | |
cd /mnt/timelapse/series_15554 | |
ffmpeg -n -pattern_type glob -r 15 -i "2014-12-02_pic_*.jpg" -r 15 -vcodec libx264 -crf 25 -g 15 -vf crop=2592:1458,scale=1280:720 timelapse_2014-12-02.mp4 | |
# Or: | |
# FRAMERATE=15 QUALITY=25 CROPPARAM=crop=2592:1458,scale=1280:720 echo ffmpeg -n -pattern_type glob -r $FRAMERATE -i "2014-12-02_pic_*.jpg" -r $FRAMERATE -vcodec libx264 -crf $QUALITY -g 15 -vf $CROPPARAM timelapse_2014-12-02.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment