Gsource on Mac

It is often difficult to tell how hard developers are working to non-IT folks. Usually I try to let them watch gsource.

gsource sample

Setting up gsource on Mac is not difficult but it has several steps. First, you have to have brew installed. Then, run below commands from Terminal,

1
# install wget if you don't have
2
brew install wget
3
4
# gsource dependency
5
brew install glew
6
brew install pkg-config
7
brew install sdl2
8
brew install sdl2_image
9
brew install boost
10
brew install glm
11
brew install pcre
12
13
# download and build gsource
14
wget https://github.com/acaudwell/Gource/releases/download/gource-0.47/gource-0.47.tar.gz
15
tar vfxz gource-0.47.tar.gz
16
cd gource-0.47
17
./configure
18
19
# assume no error from configure
20
make install

The binary will install into /usr/local/bin/gsource . Run below to generate the video from directory with git repository

1
cd [your git repository]
2
/usr/local/bin/gource

You can replace the default icon with yours by renaming your avatar to the git author name such as “Your Name.png” as in the git log, place it local director and run below gource command

1
/usr/local/bin/gource --user-image-dir .

If you feel the video is too long, you can adjust speed by changing simulation time scale (default: 1.0) -c or --time- or scale SCALE.

You can make your video less messy by reducing the maxnium number of file from unlimited to value such as 100 with --max-files NUMBER

Adding elasticity is fun with -e 0.5 when there is a large number of files are adding or deleting.

More information can be found in Control

The video can output to a file with option -o FILENAME. The file size can be over 10GB for 1 minute video so beware.

After the video generates, you can use libav to convert to mp4,

1
brew install libav
2
avconv -vcodec ppm -f image2pipe -i gource.ppm -c:v libx265 -c:a copy gource.mkv

Gource of my blog,

Share