Le Nguyen The Dat bio photo

Le Nguyen The Dat

Data Science and Engineering at Uber. Kaggle Master.

Email Twitter Facebook LinkedIn Github

Dat at Zalora from Dat Le on Vimeo.

Below are the steps to generate the above clip.

Reference: Gource and GourceMashups

  • Generate gource log file for each of the repository
gource --output-custom-log repo1.txt repo1
gource --output-custom-log repo2.txt repo2
  • Using repo name sparately for each of them:
sed -i -r "s#(.+)\|#\1|/repo1#" repo1.txt
sed -i -r "s#(.+)\|#\1|/repo2#" repo2.txt
  • Note: the above code doesn’t work if you use OS X, use this instead:
sed "s/\|\//\|\/copytables\//" repo1.txt > repo1.tmp.txt; mv repo1.tmp.txt repo1.txt
sed "s/\|\//\|\/copytables\//" repo1.txt > repo2.tmp.txt; mv repo2.tmp.txt repo2.txt
  • Squash them together:
cat *.txt | sort -n > combined.txt
  • Generate movie file:
gource combined.txt --key --title "Your clip name" --bloom-multiplier 0.5 --bloom-intensity 0.5 \
--user-image-dir /Users/datle/Zalora/avatar/ --hide filenames --seconds-per-day 0.2 \
--auto-skip-seconds 1 -1280x720 -o - \
| ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 4 -bf 0 combined.mp4

PS: it has been fun :)