Skip to content

Instantly share code, notes, and snippets.

@phil8192
Last active September 7, 2018 16:16
Show Gist options
  • Save phil8192/bcbcb4ab47b2f11465c5177e366f9c8a to your computer and use it in GitHub Desktop.
Save phil8192/bcbcb4ab47b2f11465c5177e366f9c8a to your computer and use it in GitHub Desktop.
make gource video
#!/bin/bash
## make gource video from gource logfile.
# tmp output location. this example will need 13G free.
OUT_PPM="/mnt/raid/phil/out.ppm"
# result
OUT_MP4="dump.mp4"
# dump to $OUT_PPM
gource -1280x720 --camera-mode track --hide progress --output-ppm-stream $OUT_PPM \
--background-colour 000000 --font-colour 336699 --highlight-users --highlight-colour ff0000 \
--auto-skip-seconds 1 --seconds-per-day 0.05 --title "hmm..." --user-scale 1 \
--user-image-dir tmp/avatars --bloom-multiplier 0.5 --bloom-intensity 0.5 --key
--file-extensions combo.log
# make video with ffmpeg.
ffmpeg -y -r 25 -f image2pipe -vcodec ppm -i $OUT_PPM -vcodec libx264 -preset ultrafast \
-pix_fmt yuv420p -crf 1 -threads 0 -bf 0 $OUT_MP4
echo "check $OUT_MP4"
rm -f $OUT_PPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment