Getting Gource Running on OSX

 Jul 3, 2013

A friend recently tipped me off about Gource, a neat tool for creating amazing visualisations of source code changes through out the lifetime of a project.

Searching around a bit shows some examples of just what can be done with Gource, but generally it looks like little flying users shooting lasers (representing commits), into ever growing and changing webs of files.

I loved what the end result was, and wanted to have a go myself. As it turns out it’s pretty easy to get running on a Mac. I’m currently using Mountain Lion (10.8.4) and the following all worked straight off the bat. We’ll be using Homebrew for all of this.

First up you need FFMPEG

brew install ffmpeg

This fetches the ffmpeg video encoder and its dependencies.

Then, just install Gource the same way

brew install gource

Now you’re all set and can make your first video.

Inside the top level directory of your source code under source control (where ever you ran git init for example), you run the gource command.

The wiki has loads of information about how to make these videos, and all the options available to you. However this is the command I used.

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
  • It hides most of the tooltips, such as filenames, but leaves the date and user names.
  • It reduces the amount of video time per day to 0.1 seconds per day (the project I “gourced” first has been running for 3 years)
  • It reduces the amount of wait time during no activity to 1 second. (Basically this skips to the next bit of activity after 1 second of none)
  • It’s full 720p output
  • It’s piped to ffmpeg to create an MP4 video

The majority of the command and options came straight off the Gource wiki, and I just added a few tweaks.

Finally… here is my first attempt. This is a project that I’ve spent almost all of the last 3 years working on as the sole developer, with occasional help from our testing and integration chap. Even at 0.1 seconds per day, there’s nearly 4 minutes of footage.

For the curious, the massive explosion at the end is when we made a decision to incorporate the frameworks core library into our source control so we could better manage deployments with different versions.


For another example, I ran the CakePHP framework from 2005 - 2013 through the same engine