Project

General

Profile

Actions

Codeswarm

You can generate a video from the code activity, like this one: http://www.youtube.com/watch?v=uY3d9-B6ikk using a small application called "codeswarm".

The procedure is as follows:
  • Have Python 2.6 or 2.7 installed
  • Download codeswarm from http://code.google.com/p/codeswarm
  • Update codeswarm/convert_logs/hg_log.py::82 to "mercurial.dispatch.dispatch(mercurial.dispatch.request(args))" to avoid a failure with the latest versions of Mercurial
  • Launch (assuming the Chamilo head branch is in /var/www/chamilo):
    cd convert_logs/
    python hg_log.py /var/www/chamilo/
    
  • This should have generated a .xml log in the data/ directory
  • Edit the sample.config file (there's a good example attached)
  • From the base directory of codeswarm, call ./run.sh config/sample.config. This should take a (very long) while. When done, you should have about 2GB of images in the frames/ directory. These images will then have to be converted to a video sequence...
  • Launch:
    ffmpeg -f image2 -r 24 -i frames/chamiloglobal-%05d.png -sameq ./out.mov -pass 2
    
  • This should have generated a nice "out.mov" video with all the frames, in lossless format. Now you can compress it if you want.

Alterations

Visuals

You can change a lot of settings in the config file to change the style of the video a bit (you can set a white background and select different colours for all filetypes and events).

Usernames

You should also change the usernames. This can take quite a long time and a few repeated attempts at first to get it right, but it certainly looks nicer when you see the full name of the people who contributed to the project.
To do this, edit the .xml file with the change log. This is relatively easy with vim: just search and replace for the whole document:

 :%s/"sven"/"sven.vanpoucke"/
 :%s/"laurent"/"laurent.opprecht"/
 :%s/"ywarner"/"yannick.warnier"/
 :%s/"jmontoya"/"julio.montoya"/
 :%s/"denbille"/"stefaan.vanbillemont"/
 :%s/"tcholakov"/"ivan.tcholakov"/
 :%s/"cperales"/"cesar.perales"/
 :%s/"cgoossens"/"christophe.goossens"/
 :%s/"fvauthier"/"frederic.vauthier"/
 ...

Of course, you need to do that for anyone not having set his full name in his commits...

Updated by Yannick Warnier almost 7 years ago · 4 revisions