Search Search within:  All wiki pages  Featured pages  Current pages  Deprecated pages for
Videos
Creating videos with Gource.
Updated May 24, 2014 by acaudw...@gmail.com

## Recording Videos

### Video Capture Software

By far the easiest way to record a video of Gource is using a third party video capture program. The only downside of this approach is you will have less control over the final encoding quality of the video and you may need to manually start and stop recording.

I recommend these programs:

### Raw Video Output and Encoding

You can capture raw video from Gource using the -o (aka --output-ppm-stream) option. This creates an uncompressed sequence of screenshots in PPM format which can then be processed by a video encoder (such as ffmpeg) to produce a video.

You can also adjust the output frame rate with -r (aka --output-framerate). Note you will need to adjust the frame rate used by the encoder (eg ffmpeg -r) to match, unless you are going for a speed-up timelapse or slow motion effect.

Make sure you keep the window of Gource entirely visible while recording. If you minimize or partially obscure the window, your video card may decide not draw the output consistently and you will get artifacts in your recording. You may like to use the -f option to run in full-screen mode to stop this happening.

You may want to record your video in widescreen as that is the trend for online video now days. You can record in 720p by adding -1280x720 to the command line.

Also check out the Controls section of the wiki for steps to customize the look of Gource for your videos.

## FFmpeg using x264 codec

The below command lines will create a video at 60fps using the x264 codec in an mp4 container.

This assumes you have recent version of ffmpeg with libx264 support. Some distributions like Ubuntu do not enable libx264 support by default in ffmpeg (See this thread for various ways to enable libx264 support on Ubuntu). Consult guides for your distribution if this is the case.

In one command (raw video piped directly into ffmpeg):

gource -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

As two commands:

gource -1280x720 -o gource.ppm
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i gource.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4

This one has the advantage of keeping the raw video file (gource.ppm) so you can go back and tweak the encoding parameters if you don't like the output quality or need a different video format without recording the video again. The disadvantage is that this raw uncompressed video and you can expect it to use up 100gs of gigs, so keep that in mind!

You can interchange the extension 'mp4' with 'mkv' or 'avi' to get ffmpeg to use a different container format for the video. 'avi' is typically discouraged for long videos as there is a 2GB file limit associated with that format.

Note: ffmpeg seems to be a constantly moving target, so you may find you need slightly different arguments with your version. There is a good guide to using x264 with ffmpeg here.

## FFmpeg using WebM codec

A good alternative codec to x264 is WebM. Below is a very basic command line example of using ffmpeg to produce a Gource WebM video:

gource -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libvpx -b 10000K gource.webm

### Windows

Here is an example command-line using the built in PPM frame capture support and ffmpeg to generate a video:

gource -1280x720 -o gource.ppm C:\\path\\to\\code\\repository
C:\\ffmpeg\\bin\\ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i gource.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.x264.avi

You can interchange the extension 'avi' with 'mp4' or 'mkv' to get ffmpeg to use a different container format for the video. 'avi' is typically discouraged for long videos as there is a 2GB file limit associated with that format.

You can get an ffmpeg build for Windows from here.

Note: ffmpeg seems to be a constantly moving target, so you may find you need slightly different arguments with your version. There is a good guide to using x264 with ffmpeg here.

## Videos

Video showing off the new Bloom effect:

A collage of different open source software projects displayed using Gource:

## Examples

Various videos of projects created with Gource.

## Git

Oct 1, 2009

wow, these are really fun to watch

Nov 23, 2009

Well, it does look good, but converting the output file to something usable in windows systems does not seem to be explained. Maybe there is a encoder program that could eat the produced file and convert that to some type of video?

Nov 23, 2009

Beautiful! Looks like pollination :)

Dec 1, 2009

@pjotr, nothing stops you from typing gource.avi instead of gource.h264 I am doing this right now, and so far it goes ok, except that I get occasional complaints from ffmpeg that ppm frame size is invalid at some point. Oh yeah, another annoyance was that I was unable to use '-' for STDx streams, and had to output to (rather large) ppm file.

Jan 16, 2010

can somebody tell me how to resolve the bellow error?

localhost:Downloads stliu\$ gource --start-position 0.999 --stop-at-end --output-ppm-stream - --log-format custom --user-image-dir ./gource-img b.log | ffmpeg -y -b 3000K -bt 3000K -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 gource.mp4 FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.

configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-libspeex libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 1. 4. 0 / 1. 4. 0 libswscale 1. 7. 1 / 1. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Jan 17 2010 14:31:31, gcc: 4.2.1 (Apple Inc. build 5646) (dot 1)
Input #0, image2pipe, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: ppm, rgb24, 1024x768, 60 tbr, 60 tbn, 60 tbc
Output #0, mp4, to 'gource.mp4':
Stream #0.0: Video: libx264, yuv420p, 1024x768, q=2-31, 3000 kb/s, 90k tbn, 60 tbc
Stream mapping:
Stream #0.0 -> #0.0
@ 0x101831c00?broken ffmpeg default settings detected @ 0x101831c00?use an encoding preset (vpre) Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Jan 16, 2010

It may be you need add the -vpre option to the ffmpeg command. Eg '-vpre default'.

Let me know if that helps.

Jan 22, 2010

I had the same problem, with the option -vpre default, its perfect. Thank you.

Feb 24, 2010

Is there a way to have the focus on a specific directory? In some cases the "important" directories of a project are distracted by minor important ones (e.g. data-directory with lots of images,...)

Feb 25, 2010

Not currently. You can filter out stuff you're not interested in though. eg:

gource --file-filter "/data/"

Would filter out any files that contained /data/ in their path. This command actually takes a regular expression, so you can do more complicated stuff with it as well.

Mar 21, 2010

Great program, im the author of the RGN Vietnam Mod (a COD Game modification project) - I run SVN win32 and used the python script to generate then the following command line: C:\Program Files\gource>gource -s 0.5 -b 000000 --hide dirnames --bloom-intensity 1 --disable-progress --output-framerate 60 --camera-mode track --log-format custom vietnam.log

Mar 21, 2010

Yohan. Glad you like it. I've had the song from your video stuck in my head all day :)

Mar 26, 2010

umm.. i'm not much of a programmer, how does one create video files using gource? I tried what was put up on here, but i don't understand, do I put the ffmpeg folder within the gource folder?

Mar 31, 2010

No. You can either just specify the full path of the executable, or you can add program directories to your window search 'path' so they work from anywhere.

Also, you may prefer to use Fraps which is a GUI program.

Apr 3, 2010

Twisted's SVN repository from 2001 to 2010: http://vimeo.com/10661539

Apr 14, 2010

amazing ruby one rails i made! http://www.youtube.com/watch?v=r0ji8FDNTj0

Apr 15, 2010

Thanks for posting your videos :)

I'd love to know why a lot of videos of Gource on Youtube have the first key frame missing.

Is it at the Youtube end? Are there better ffmpeg options that make it go away?

May 19, 2010

If someone wants an alternate solution to the developer's recommendation to use Fraps (a commercial product) under Windows, try WeGame?. It is geared for capturing video games to AVI format but should work fine for Gource. In theory. I didn't try it but just wanted to toss it out there as a possible option.

Another approach for Windows users of Gource is to fire up a VMWare Player virtual machine loaded with Linux (e.g. Ubuntu), git, ffmepg, etc. and then follow the normal directions for making a video. VMWare Player is free, using www.easyvmx.com to create the .vmx and drive configurations is also free, and, of course, Ubuntu Linux is free. Yes it is a bit of work but every Windows developer should have a VMWare image on hand with Linux installed just for the weird instances where Linux happens to have the slightly better toolset.

May 20, 2010

This is an amazing tool, love it.

Yet, please help, i cannot get the second step under windows to run (the ffmpeg part). First, i got the same error as you guys above: Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Then i tried it with this command: ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i ppm.out -vpre default -vcodec libx264 gource.x264.avi

But now i get this error: @ 019fd4b0?Estimating duration from bitrate, this may be inaccurate Input #0, image2pipe, from 'ppm.out':

Duration: N/A, bitrate: N/A
Stream #0.0: Video: ppm, rgb24, 1024x768, 60 fps, 60 tbr, 60 tbn, 60 tbc

May 20, 2010

I think this thread discusses the problem you're having: http://forum.doom9.org/showthread.php?t=148777

May 20, 2010

then instead of using -vpre default use -vpre libx264-default

from your example ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i ppm.out -vpre libx264-default -vcodec libx264 gource.x264.avi

May 21, 2010

thanks for your help, guys. this tip from the forum was that finally worked for me: If you don't want to clutter your environment variable space, you can keep the presets in a folder named:

<drive letter>:\usr\local\share\ffmpeg

May 26, 2010

To make a video on windows, i used the following (after almost a day of research)

Use the parameters above to get a massive PPM file. (i used this : gource --log-format custom my-project-gource.log -s 0.1 --hide filenames,usernames --camera-mode overview --bloom-intensity 1.0 --disable-progress --multi-sampling -1280x720 --output-ppm-stream PPM.ppm )

Then get a ffmpeg build here : http://tripp.arrozcru.org/ (Others build have x264 broken, that was my main problem actually, always having "Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height" when starting)

You might want to try either Avanti to set up video encoding, or else, use a command line like this one :

"D:\ffmpeg.exe" -an -threads 4 -y -f image2pipe -i "d:\PPM.ppm" -vcodec libx264 -aspect 16:9 -s 1280x720 -r 30.000 -vb 8000000 -vpre "D:\libx264-hq.ffpreset" "d:\Final.mp4"

-an is for no sound -threads is better adjusted to one per CPU core -y is for overwriting the out file -f image2pipe is to specify ffmpeg that image in PPM.ppm are concatened in the same file -r is for the output frame rate -vb is for the output bitrate -vpre is here to specify the x264 encoding parameters

(-vpre is sometimes problematic with path to .ffpreset files, if you get some errors, google it, it's quite basic to fix)

And voila, from 33GB file to 300MB for 15min of video (i'll put the link here when it's uploaded).

May 27, 2010

Here it is, if you want to add it to the list of videos featured : http://www.youtube.com/watch?v=MU9pHh4EOOQ

Sep 20, 2010

2-machine style: requires: bash, netcat, working ffmpeg

console 1 gource -s .3 --output-ppm-stream - > >(nc 10.8.8.8 9999) --stop-on-idle

console 2 ffmpeg -b 2000K -r 60 -f image2pipe -vcodec ppm -i - < <(nc -l 9999 ) -qmax 22 -vcodec libx264 -vpre normal -y /tmp/x.mp4

Sep 28, 2010

Thanks for the great tool! Here is a video I made: http://www.youtube.com/watch?v=77GLamoVtiU. We showed this at our annual customer forum and our customer's got a kick out of it.

Oct 18, 2010

Outstanding! We compressed 5 years of development of object database db4o (http://developer.db4o.com) and the result is breathtaking!! =D Thanks!! http://db4o.blip.tv/file/4214109/

Nov 12, 2010

We have our svn repo visualized, if want to add it in the list of featured videos: http://www.youtube.com/watch?v=fV5kKUYchpk

Nov 30, 2010

It is great to see years of software progress summarized in five minutes.

Dec 10, 2010

If you get errors like this:

@ 0x121835000?broken ffmpeg default settings detected @ 0x121835000?use an encoding preset (vpre)

make sure that the commands you supply are in the correct order...

gource --load-config gource.complete.conf --output-ppm-stream - | ffmpeg -y -b 6000K -r 30 -f image2pipe -vcodec ppm -i - -vcodec libx264 -vpre default gource.mp4

in other words -vpre or -fpre must come before the output filename at the end.

alternatively don't try and work it out at 1.30am and go to bed instead.

great program.... we're using it to visualize webserver access logs as well as VCS. quite fun watching bots and visitors crawling your site.

such a shame its 1.30am and I didn't think to look at http://code.google.com/p/logstalgia/

g'night.

Jan 4, 2011

Hello. I made a video with symfony2 repo : http://www.youtube.com/watch?v=164Z1gyqk6M Enjoy it ;)

Feb 2, 2011

Hello ! If someone is interested, I've made an integration between Google Analytics data and Gource, see video here: http://pyevolve.sourceforge.net/wordpress/?p=1423 Enjoy =)

Feb 6, 2011

Using it with Analytics is a pretty interesting idea.

Feb 6, 2011

If someone wants to come up with a simple Gource video command line for Linux using Webm or something available easily from Ubuntu I would be happy to add it here.

Mar 22, 2011
Apr 14, 2011

My tribute to gource : http://www.youtube.com/watch?v=4NzvXTEauUA Have fun !

Apr 27, 2011

There seems to be an issue right now with the 64-bit ffmpeg static binaries for windows - your colors may come out goofy (RGB24->YUV420p problem?)

Anyways - give the 32-bit version of ffmpeg a try - that fixed my 'color' issues.

Jun 24, 2011
I'd love to know why a lot of videos of Gource on Youtube have the first key frame missing.

I don't know why this happens when using h264, but I have found if you use WebM instead then the upload to YouTube? works fine and the grey artefacts as the start of the video disappear.

Jul 25, 2011

I gather from a few posts like this that Youtube doesn't like x264 videos with 'B-frames' and that this may be causing greyness at the start of videos, so I've added '-bf 0' to the command lines above to disable that option.

Aug 10, 2011

Just like Sheb said, I thought the same thing--appearance matches bees tending to flowers. Very kool.

Oct 14, 2011

Where is everyone getting a version of FFMPEG that suports ppm files. I'm running on ubuntu 11.04 and I've installed the one from the repo, I also followed all instructions from the top of this post about compiling from the git repo's and just to be sure, I installed FFMPEG on a linux mint box and it also doesn't support the ppm format. To be clear, if I enter "ffmpeg -formats" I get a big list of types that when it gets to the p's lists "pmp, psp, psxstr, pva", so no ppm. Any suggestions?

Oct 14, 2011

HI.

My copy of ffmpeg doesn't list ppm under formats either, so that probably doesn't mean anything.

I am guessing your issue is more likely to be with x264 support than ppm and ffmpeg is just giving a confusing error message.

Maybe try to output an mpeg instead to confirm this.

Oct 20, 2011

Hey, what are the audio tracks behind these vids? I would love to download them, they are quite good.

Thank you.

Nov 15, 2011

How does one display a visualisation from a cloned Git repo for one specific user?

Dec 12, 2011

How configure the time to display the file names???

Dec 22, 2011

Superb technology Liked it

Apr 22, 2012

I've done a video for DSpace document respository system using Gource 0.37 (0.38 gives me a library error).

Apr 23, 2012

Thanks for pointing out the error. I've updated the Windows build.

May 11, 2012

Here is a the YaCy? development visualization with gource: https://vimeo.com/41953443

Dec 2, 2012

Is there any way to make gource exit automatically when creating a video?

Jan 18, 2013

Firebird git repository visualization with gource http://www.firebirdnews.org/?p=8185

Mar 16, 2013

This may be mentioned elsewhere, but if you are trying to render for mac os x 10.8.x and quicktime 10.2, add the flag "-pix_fmt yuv420p" to ffmpeg (ref: http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide)

Feb 6, 2014

I have a .log file that runs nicely with gource however I want to save the video and apparently when I type "gource -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 creates a video for my bitbucket activities am not sure why .. how can I feed in the .log file name in the command above ? Thanks

Feb 7, 2014

Pass your log file as the last argument to Gource (before the '|').

May 23, 2014

For creating videos using Windows: I've found that the free version of Fraps only allows you to record 30 seconds of video. Instead, I'm now using Open Broadcast Software to record video using Windows, which is free open source software and which is working well. https://obsproject.com/

May 24, 2014

Good tip. I've updated the Wiki to suggest people use OBS.

Jul 14, 2014

visualization of miscreated indie game: