Created
October 16, 2012 02:27
-
-
Save alexander-bauer/3896937 to your computer and use it in GitHub Desktop.
Small script to wrap using gource and ffmpeg to save repository visualizations to files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script is meant to act as a wrapper to gource, and creates a | |
# movie file (with the supplied file extension,) at 60fps and of the | |
# given number of seconds per day. | |
# | |
# Please see https://code.google.com/p/gource for information on | |
# gource. | |
# | |
if [ -z $1 ] | |
then | |
echo "usage: $0 outfile.flv [speed] [title]" | |
fi | |
OUTFILE=$1 | |
SPEED=$2 | |
TITLE=$3 | |
OPT_SPEED="-s 0.5 -a 0.5" | |
OPT_TITLE= | |
OPT_FRAMERATE="-r 60" | |
OPT_HIDE="--hide progress,filenames,mouse" | |
OPT_HIGHLIGHT="--highlight-all-users --highlight-dirs" | |
OPT_FILEIDLE="--file-idle-time 0" | |
if [ -n $SPEED ] | |
then | |
OPT_SPEED="-s $SPEED -a $SPEED" | |
fi | |
if [ -n $TITLE ] | |
then | |
OPT_TITLE="--title \"$TITLE\"" | |
fi | |
gource $OPT_SPEED $OPT_TITLE \ | |
$OPT_FRAMERATE $OPT_HIDE $OPT_HIGHLIGHT $OPT_FILEIDLE \ | |
--stop-at-end -o -\ | |
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - \ | |
$OPT_FRAMERATE -sameq $OUTFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment