Installing & Using Gource on OS X

Published on November 10, 2011

Gource is a software version control visualization tool.

Software projects are displayed by Gource as an animated tree with the root directory of the project at its centre. Directories appear as branches with files as leaves. Developers can be seen working on the tree at the times they contributed to the project.

Installing Gource Manually (w/out MacPorts or Homebrew)

Not for the faint of heart…

Install SDL

$ hg clone -u SDL-1.2 SDL-1.2
$ cd SDL-1.2
$ ./
$ ./configure && make && sudo make install

Install SDL Image

$ hg clone -u release-1.2.10 SDL_Image-1.2.10
$ cd SDL_Image-1.2.10
$ ./
$ ./configure && make && sudo make install

Install PCRE3

$ svn co svn:// pcre
$ cd pcre
$ ./
$ ./configure && make && sudo make install

Install GLEW

Note: Installing from the public Git repository fails on OS X.

$ curl -L -O
$ tar xvfz glew-1.7.0.tgz
$ rm glew-1.7.0.tgz
$ cd glew-1.7.0
$ make && sudo make install

Install Gource

$ git clone git://
$ cd Gource
$ git co gource-0.37
$ git submodule init
$ git submodule update
$ autoreconf -f -i
$ ./configure && make && sudo make install


$ gource ./ -s 0.5 -b 000000 -1280x720

Optional Features/Installs

Install FFmpeg

This will enable outputting to video.

Yasm (requirement)

$ git clone git://
$ cd yasm
$ git co v1.2.0
$ ./
$ ./configure && make && sudo make install

LAME (optional requirement)

Optional: This allows laying an audio track over the visualization.

$ curl -L -O
$ tar xvfz lame-3.99.1.tar.gz
$ rm lame-3.99.1.tar.gz
$ cd lame-3.99.1
$ ./configure && make && sudo make install

x264 (requirement)

$ curl -L -O
$ tar xvfj last_x264.tar.bz2
$ rm last_x264.tar.bz2
$ cd x264-snapshot-[datestamp]-[timestamp]
$ ./configure --enable-shared
$ make && sudo make install

Xvid (requirement)

$ curl -L -O
$ tar xvfz xvidcore-1.3.2.tar.gz
$ rm xvidcore-1.3.2.tar.gz
$ cd xvidcore/build/generic/
$ ./configure && make && sudo make install


$ curl -L -O
$ tar xvfz ffmpeg-0.8.6.tar.gz
$ rm ffmpeg-0.8.6.tar.gz
$ cd ffmpeg-0.8.6
$ ./configure --enable-shared --enable-libmp3lame --enable-gpl --enable-libx264 --enable-libxvid
$ make && sudo make install

Note: If LAME was not installed, exclude the --enable-libmp3lame argument from the configure command.


The command below will create a video at 28fps using the x264 codec in an mp4 container with an audio track over the top – the output will be the length of the video/audio track, whichever is longer.

$ gource ./ -s 0.5 -b 000000 -1280x720 --output-ppm-stream - | ffmpeg -y -b 3000K -r 28 -f image2pipe -vcodec ppm -i - -i audio.mp3 -vcodec libx264 -preset slow -crf 28 -threads 0 output.mp4

Note: If LAME was not installed, exclude the -i audio.mp3 argument/value from the piped ffmpeg command.

Gravatar Support

Gource supports user images; here is a Perl script that will pull images from Gravatar based on email addresses found in git-log.

#fetch Gravatars

use strict;
use warnings;

use LWP::Simple;
use Digest::MD5 qw(md5_hex);

my $size       = 90;
my $output_dir = '.git/avatar';

die("no .git/ directory found in current path\n") unless -d '.git';

mkdir($output_dir) unless -d $output_dir;

open(GITLOG, q/git log --pretty=format:"%ae|%an" |/) or die("failed to read git-log: $!\n");

my %processed_authors;

while(<GITLOG>) {
    my($email, $author) = split(/\|/, $_);

    next if $processed_authors{$author}++;

    my $author_image_file = $output_dir . '/' . $author . '.png';

    #skip images we have
    next if -e $author_image_file;

    #try and fetch image

    my $grav_url = "".md5_hex(lc $email)."?d=404&size=".$size;

    warn "fetching image for '$author' $email ($grav_url)...\n";

    my $rc = getstore($grav_url, $author_image_file);


    if($rc != 200) {

close GITLOG;


$ gource --user-image-dir .git/avatar/