Awesome version control visualization with gource

After a big project it is often cool to release “making of” video, presenting collaborative effort of people who contributed to the success. In case of designers, filmmakers or other “artistic” types it is quite easy to present their work in progress. But what about developers? They always sit at their desks and type on their keyboards, it looks the same at the beginning and at the end of the project – nothing spectacular.

A year ago, when we finished new version of website I wanted to show – in light and comprehensive way – the vast amount of awesome work performed by my team. This is where gource came to the rescue. Gource is an awesome tool to visualize work on the codebase in form of colorful video. It takes information about the code structure, contributors and timing from logs of revision control tools (Git, Mercurial, SVN and Bazaar are supported). Code is presented as branches and leaves, being worked on by developer icons flying around. As the tool is highly parameterizable, it is easy to add colors, logos, backgrounds, etc., show or hide specific information.

You may easily play with the tool by yourself, so as a quick tutorial, here are the commands to generate simple video. You need gource itself and the FFmpeg library. These commands are Windows specific (as my Windows box is more powerful), but they’re easy to port to Linux. Try to play with the parameters by yourself.

First, of course, clone your repository to specific location. Then, run this command to create PPM file with the video (PPM file is a series of bitmap images, so expect this file to be huge):

"c:\program files (x86)\gource\gource.exe" -s 0.5 --hide filenames -1280x720 -o gource.ppm

Then, you need to convert the PPM file to compressed video:

C:\ffmpeg\bin\ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i gource.ppm -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 gource.x264.avi

And voila, you have a nice video:

Good luck with preparing your own awesome visualizations 🙂