And finally, 12 hours of tinkering with Mediacoder later I managed to make a working video:
http://youtu.be/TZ1V33GqeLM
Sadly the timings weren't working properly, and I couldn't make them work properly (maybe because it cuts only at key frames?), so video is longer than necessary...