Skip to content

Instantly share code, notes, and snippets.

@steven2358
Forked from lancewalton/gource.sh
Last active May 15, 2018 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steven2358/7d701374a6baa9a8334431ce9f8658ae to your computer and use it in GitHub Desktop.
Save steven2358/7d701374a6baa9a8334431ce9f8658ae to your computer and use it in GitHub Desktop.
Produces a video of the evolution of a git repository using gource (see https://gource.io/).
#!/bin/zsh
if (( !($# == 3) ))
then
echo "Usage:"
echo $0 "<ffmpeg preset> <output file base name> <seconds per day>"
exit 1
fi
"""
ffmpeg_preset
---
ultrafast
superfast
veryfast
faster
fast
medium – default preset
slow
slower
veryslow
placebo
"""
ffmpeg_preset=$1
output_file=$2
seconds_per_day=$3
git log --pretty=format:"%ae|%an" | sort | uniq | while read -r line
do parts=("${(s/|/)line}")
done
gource --seconds-per-day $seconds_per_day --hide filenames,mouse --key -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ${ffmpeg_preset} -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 ${output_file}.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment