Last active
August 29, 2017 16:30
-
-
Save creaktive/fca3b04c4916ef8c24c02b79f8ecb9c1 to your computer and use it in GitHub Desktop.
GoPro HERO4 Session CLI timelapse
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
# unwarp, rescale & rename GoPro pics using 4 CPUs | |
find /Volumes/NO\ NAME/DCIM/ -type f -regex '.*/G[0-9]+.JPG' | | |
sort | | |
perl -MPOSIX=strftime -lne 'printf qq(convert "%s" -filter Lanczos -distort barrel "0.06335 -0.18432 -0.13009" -resize 1440x1080 -font Courier -pointsize 32 -draw "gravity southeast fill white text 0,0 \\\"%s\\\"" -quality 100 tl%05d.jpg\0), $_, strftime("%Y-%m-%d %H:%M", localtime [stat($_)]->[9]), ++$i' | | |
xargs -0 -n1 -P4 sh -c | |
# build timelapse at 60 fps | |
ffmpeg -f image2 -framerate 60 -i tl%05d.jpg -s 1440x1080 -pix_fmt yuv420p timelapse.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment