Skip to content

Instantly share code, notes, and snippets.

@azone
Forked from XueshiQiao/gource.sh
Last active March 16, 2022 14:01
Show Gist options
  • Save azone/5932730 to your computer and use it in GitHub Desktop.
Save azone/5932730 to your computer and use it in GitHub Desktop.
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install
# 3.generate a video for you repo.
$ /path/to/project_movie.sh project1 [project2] [project3]...
# It's Done! Just share the video with your teammates, Have fun!
#!/bin/bash
for project in $*; do
if [[ ! -d "$project" ]]; then
echo "'$project' not found"
continue
fi
if [[ ! -d "$project/.git" ]]; then
echo "'$project' is not valid git project"
continue
fi
gource \
-s .06 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
--hide mouse,progress \
--file-idle-time 0 \
--max-files 0 \
--background-colour 000000 \
--font-size 22 \
--title "$project" \
--output-ppm-stream - \
--output-framerate 30 \
$project \
| avconv -y -r 30 -f image2pipe -vcodec ppm -i - -b 65536K "$project.mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment