Skip to content

Instantly share code, notes, and snippets.

@willingc
Created December 21, 2022 22:27
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 willingc/ec84ef9de40849ad2f5281a85ed1b44d to your computer and use it in GitHub Desktop.
Save willingc/ec84ef9de40849ad2f5281a85ed1b44d to your computer and use it in GitHub Desktop.
Gource video of multiple repos

Retro Video Process

Use gource, ffmpeg packages to do the primary work. They can be brew installed.

Basic process

You will take a repo and use gource to generate a log file of timestamps and commits.

Then you can feed that log into gource to render a video of the timeline.

Lots of configuration parameters

From the root of a gate cloned repo, create a log file.

gource \
  --hide dirnames,filenames \
  --seconds-per-day 0.1 \
  --auto-skip-seconds 1 \
  --logo Vector.png \
  --date-format "%x"
  --title "Gate"
  -1280x720 \
  -o gate.txt

If you are only creating a video for one repo, the log file and rendering can be done in the same step:

gource --hide dirnames,filenames --seconds-per-day 0.1 --auto-skip-seconds 1 -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4

Config parameters

The gource wiki describes the many config options. Some are:

--key

--disable-bloom

--date-format "%D"

--title "My Project"

--logo logo.png

--logo-offset XxY

Combined video of multiple repos

  1. Run gource on each cloned repo and save the log file for each one: gate.txt, geas.txt...

  2. Put all of the log files into the same folder.

  3. To combine and sort all of the logs:

cat dx.txt gate.txt geas.txt gitops.txt helm-charts.txt papermill-origami.txt planar-ally.txt polymorph.txt summon-celestial.txt | sort -n > combined.txt

You could run a script to do this but I used brute force.

  1. Create the video from the combined logs:

gource combined.txt --hide dirnames,filenames --seconds-per-day 0.15 --auto-skip-seconds 1 --date-format "%Y-%m-%d" --logo ../Vector.png --title "Noteable 2022 Retro" --hide-root -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 combined.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment