| Home | Notes | Github |
|---|
Script to convert:
#!/bin/bash
mkdir temp
# Creating the ordered list of photos
ls -v *.JPG | cat -n | while read n f; do cp -n "$f" "./temp/$n.jpg"; done
# Creating 2 vide files
$(cd temp/ && ffmpeg -framerate 30 -i %d.jpg -c:v libx264 -vf format=yuv420p
output30.mp4)
$(cd temp/ && ffmpeg -framerate 60 -i %d.jpg -c:v libx264 -r 60 -vf format=yuv420p output60.mp4)
# To rotate the output 180 (or 90 for that matter) use:
#$(cd temp/ && ffmpeg -framerate 30 -i %d.jpg -c:v libx264 -vf "rotate=PI:bilinear=0,format=yuv420p" output30.mp4)
## Remove the bilinear part if not a multiple of PI/2
mv temp/output60.mp4 ./output60.mp4
mv temp/output30.mp4 ./output30.mp4
#rm temp/Info courtesy of: - Link 1 - Link 2
Info on Time / Space limitations: - The camera I use has an internal 10k photo limit (per run). - For 5s interval that means 13h of time lapse. - Adjust accordingly. - At 30fps that translates to 5 minutes 30s of footage. - I usually use 8MP images which makes a ~4k video1. - This can be down scaled for better web video. - At ~1.2MB per image that’s 12GB max of data (often much less). SD card isn’t usually the limitation.