Skip to content

Instantly share code, notes, and snippets.

@fcamp
Created November 9, 2017 11:24
Show Gist options
  • Save fcamp/90f97bc83133f7268760bd2f474ba860 to your computer and use it in GitHub Desktop.
Save fcamp/90f97bc83133f7268760bd2f474ba860 to your computer and use it in GitHub Desktop.
Generates an mp4 from a bunch of images overlaying modify date
#!/bin/bash
#Generates an mp4 from a bunch of images overlaying data
#Requires imagemagick and ffmpeg
#Generates the temporary images overlaying the date we wont
for i in *.jpg; do
echo $i
convert $i -pointsize 48 -gravity NorthWest -annotate 0 "%[date:modify]" tmp-$i
done
#make a 2hz video with the images
ffmpeg -r 2 -i tmp-%08d.jpg -c:v libx264 -pix_fmt yuv420p out.mp4
#clean temp
rm tmp-*.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment