so here is what i’ve been up to…
One of my favorite hobbies is running and of course programming is another. I have recently started recording my Starcraft II Heart of the Swarm videos and I had to commentate my games and edit and upload them to youtube… so in the process of doing all that, i discovered i had a new hobby which is video editing.
So what does a nerd with three such hobbies do? Mix it all together and the result is this:
So what is so special about this video? Good question, and here is your answer:
- The video was taken while I was running a full marathon, 42.195 km or shall we say 26.2 Miles for my dear american readers who have no idea what a KM is :p. (i.e. first hobby running)
- I had to edit the video to remove the bad footage and put it all together. (i.e. second hobby video editing)
- I used programming to
- sync and embed (distance, elapsed time, elapsed distance) from my GPS enabled Garmin watch with my video (i.e. third hobby programming)
- extract each runner’s info from the Dubai marathon results page and then sync and embed it with my video (i.e. third hobby programming)
Here is how I did it:
1- I used php code to crawl the results pages from here : dubai.mikatiming.de/2014/ and save them into a csv file
2- After editing my video footage, I wrote down each runners bib, example, 2384,3:53… it means load the info of runner 2384 at the 3 minutes and 53 seconds of the video. I saved this info in a csv
3- During my run, I video taped my watch at the start of the race to know which point does my video and watch coincide at. Then I defined these coinciding points in another csv file.
4- I used extended script in After effects to programmatically create the compositions, solids and text boxes, create key frames, add opacity transitions based on the csv files in steps 1, 2 and 3…
… I rendered the video and here we are…
If you have any questions, or need help doing a similar project, or would like to see some sample code, please feel free to comment on this post and I’ll happy to answer your questions.