Skip to content

Instantly share code, notes, and snippets.

@nothub
Last active September 26, 2020 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nothub/ab9c20fe3d0a20fa123f0cbf970dd0b3 to your computer and use it in GitHub Desktop.
Save nothub/ab9c20fe3d0a20fa123f0cbf970dd0b3 to your computer and use it in GitHub Desktop.
gource
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "please provide dir path containign repos"
exit 1
fi
cd "$1"
> combined.txt
for d in */ ; do
REPO="${d///}"
echo $REPO
gource --output-custom-log "$REPO".txt "$REPO"
sed -i -r "s#(.+)\|#\1|/$REPO#" "$REPO".txt
cat "$REPO".txt >> combined.txt
done
cat combined.txt | sort -n > combined_sorted.txt
cd -
gource "$1"/combined_sorted.txt \
-1920x1080 \
--hide-root \
--no-time-travel \
--auto-skip-seconds 0.2 \
--key \
--file-extension-fallback \
--max-files 99999 \
--highlight-users \
--user-image-dir ../images \
--user-friction 0.2 \
--user-scale 2 \
--user-font-size 24 \
--file-font-size 20 \
--dir-font-size 18 \
--dir-name-depth 6 \
--bloom-intensity 0.3 \
--bloom-multiplier 0.3 \
--hide mouse \
--disable-input \
--stop-at-end \
--multi-sampling \
--output-framerate 30 \
--output-ppm-stream - \
| ffmpeg -y \
-r 30 \
-f image2pipe \
-vcodec ppm \
-i - \
-vcodec libx265 \
-preset ultrafast \
-pix_fmt yuv420p \
-crf 12 \
-threads 0 \
-bf 0 \
gource-multirepo.mp4
#!/bin/bash
# read gource manpage for infos on user images
gource "$1" \
-1920x1080 \
--no-time-travel \
--auto-skip-seconds 0.2 \
--key \
--file-extension-fallback \
--max-files 99999 \
--highlight-users \
--user-image-dir images \
--user-friction 0.2 \
--user-scale 2 \
--user-font-size 24 \
--file-font-size 20 \
--dir-font-size 18 \
--dir-name-depth 6 \
--bloom-intensity 0.3 \
--bloom-multiplier 0.3 \
--hide mouse \
--disable-input \
--stop-at-end \
--multi-sampling \
--output-framerate 30 \
--output-ppm-stream - \
| ffmpeg -y \
-r 30 \
-f image2pipe \
-vcodec ppm \
-i - \
-vcodec libx265 \
-preset ultrafast \
-pix_fmt yuv420p \
-crf 12 \
-threads 0 \
-bf 0 \
"$1".mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment