Captions to Overlay Flight Data on Videos

by franck | May 28, 2012 | (9) Posted in Tips

Hello!

I recently got an APM2 board from DIYDrones and I started testing to log flight data. I just mounted it on a scratchbuilt plane and flew around for a few minutes. None of the controls were plugged to the APM2 board but it still logs sensor data such as GPS, altitude, heading, pitch and roll at a rate of 10Hz.

The ArduPilot Planner application allow retrieving the logs as a text file and can export GPX and VMZ files which can be opened by Google Maps and Google Earth to visualize the flight path. This is really cool but what I wanted in addition to be able to see the data together with the video of the flight, like with an OSD but on the HD video.

First I thought that this would require some heavyweight video editing but it turn out that there is a very simple solution: use captions. The idea is to generate a caption file with the flight data and then let the video player overlay the data on the video. Caption file are simple text files, I have used the SRT format (see http://en.wikipedia.org/wiki/SubRip
).

Once you have the caption file (the tricky part being to synchronize the data and video), almost any player will be able to use it (I am using VLC). Even Youtube can use such a caption file. In the video above I have just uploaded the caption file after the video was uploaded. One benefit of using captions is that you can turn them on and off. If you want to "burn" the data in the video, VLC can also do that.

I hope you'll find this useful, if there is some interest I might cleanup and release my piece of code which produces caption files from the APM2 logs.

Cheers!

Franck

COMMENTS

kenton on May 30, 2012
Cool tip, just need to remind people to press the "CC" button the YouTube video in order to see the caption data you are talking about.
Log In to reply
colorex on June 5, 2012
WOW! That's really smart, so you can turn them off if you want!
Log In to reply
MDob on July 4, 2012
Thanks so much! I recently got the logging working on my APM2 (after ages of issues I realized that the card was not seated properly) and this will be great once I get my keychain camera! Thanks again and happy flying!
Log In to reply
UndCon on May 31, 2012
True that - I didnt see any so I had to activate CC as well - but it is a cool feature
Log In to reply
Sirglider on November 19, 2013
Brillant idea! I'll try it on my videos as well as it seems an efficient way of data overlaying.
Log In to reply

You need to log-in to comment on articles.


Captions to Overlay Flight Data on Videos