5

I have a repository on github and i want a tool that produces a visualization video like this:

Koha Library Software History Visualization

is there a step by step tutorial to make such a video in windows ?

AAlkhabbaz
  • 197
  • 1
  • 3
  • 13

6 Answers6

7

The gource wiki has good info on how to do it.

Andy
  • 44,610
  • 13
  • 70
  • 69
  • can you please explain where should i put git file,i mean where gource get the source file of repository thanks – AAlkhabbaz Feb 07 '12 at 19:43
  • 1
    Clone your repository on your local machine and type "gource.exe" - as simple as that. – Alex Feb 07 '12 at 22:09
2

If somebody wants just a one liner copy paste, use this (needs ffmpeg with libx264):

gource -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 gource.mp4
Ferenc Takacs
  • 597
  • 7
  • 8
  • Works perfectly. Only issue I have is the video gets huge. But the different parameters help me already a lot. Btw. If you don't have ffmpeg you can install it on macos with: "brew install ffmpeg" – judos Feb 02 '17 at 15:26
1

Something not explained in the docs; In a standard Windows GIT install the path to the git binary is not added to windows PATH environment variable by default. Instead GIT uses it's own command-prompt on windows. Thus running gource from the windows command-prompt will result in git not being found.

To enable git from standard windows command-prompt you will need to add it to the PATH environment variable.

From the windows command-prompt type (where C:\Program Files (x86)\Git\bin is the path to git on your computer):

set path=%path%;C:\Program Files (x86)\Git\bin
MrYellow
  • 426
  • 6
  • 23
1

For generating the actual video in Windows (with Gource), check out the Windows section of http://code.google.com/p/gource/wiki/Videos. There is a related command run at an old SO post at Gource on Windows. The instructions here: http://nooshu.com/visualising-subversion-with-gource show how to generate a gource log file for svn, which gource can then play back. The git variation should be similar. Note that the original question concerned Gource.

Community
  • 1
  • 1
Nick Martin
  • 282
  • 1
  • 4
0

Well, that video was created using Gource. It understands Git logs and there's a Windows version. Also, there's a Wiki write-up on creating videos with it here.

-1
#!/bin/bash
# This is script of the generation video from "Gource".

# project: Screensaver Kodi Universe (http://berserk.tv)
# This script creates a ZIP archive of a Kodi screensaver.
# GNU GENERAL PUBLIC LICENSE. Version 2, June 1991
# 
OUT_DIR="output"
OUT="kodi-universe.mkv"
NAME_PROJ="screensaver.kodi.universe"
MEDIA_PATH="${NAME_PROJ}/resources/skins/default/media"
NAME_REP="https://github.com/berserktv/${NAME_PROJ}.git"

GSFILE="output.ppm"
SECONDS_PER_DAY="1"
GOURCE_FRAME_RATE="30"
RESOLUTION="-1920x1080"
CODEC_OUT_FRAME_RATE="25"

FFPARAM="-vcodec libx264 -profile:v high422 -pix_fmt yuv420p"
GSPARAM1="--camera-mode track ${RESOLUTION} --stop-position 1.0 --seconds-per-day ${SECONDS_PER_DAY}"
GSPARAM2="--git-branch origin/master --multi-sampling --stop-at-end --hide-filenames"
GSPARAM3="--highlight-users --file-idle-time 13 --max-files 0 --hide date"
GSPARAM4="--title Kodi --bloom-multiplier 1.0 --bloom-intensity 1.0"

VIS="visualize"
GIT_REP="https://github.com/xbmc/xbmc.git"
# arg1 - Git Project PATH
# example: ./create.sh "https://github.com/facebook/react.git"
if [ -n "$1" ]; then GIT_REP="$1"; fi

# INSTALL PACKAGE git zip ffmpeg gource
packages="git zip ffmpeg gource"
for i in $packages; do
  if ! dpkg -s $i | grep -q "install ok installed"; then sudo apt-get install -y $i; fi
done 

test -d ${OUT_DIR} || mkdir -p ${OUT_DIR}
cd ${OUT_DIR}
# download screensaver Kodi Universe и GIT for Visualization
if ! git clone ${NAME_REP} ${NAME_PROJ}; then echo "Error, not load ${NAME_REP}, exit ..."; exit 1; fi
if ! git clone ${GIT_REP} ${VIS};        then echo "Error, not load ${GIT_REP},  exit ..."; exit 2; fi


gource ${VIS} ${GSPARAM1} ${GSPARAM2} ${GSPARAM3} ${GSPARAM4} --output-framerate ${GOURCE_FRAME_RATE} --output-ppm-stream ${GSFILE}
ffmpeg -y -r ${GOURCE_FRAME_RATE} -f image2pipe -vcodec ppm -i ${GSFILE} ${FFPARAM} -r ${CODEC_OUT_FRAME_RATE} ${OUT} && sync
mv -f ${OUT} ${MEDIA_PATH}
rm -f ${GSFILE}
zip -r ${NAME_PROJ}.zip ${NAME_PROJ}
  • 1
    Hi, Alexander. Welcome to stackoverflow. Can you include some explanation also? – Jason Allshorn Jan 08 '18 at 09:21
  • If you add some details on the solution you are providing, and the exact code part which resolves the OP question, you will be helping more and your answer may be more adopted. – hd84335 Jan 08 '18 at 09:31