A friend of mine asked me how I made the short film : Luxembourg Kirchberg to Howald done quicker. So I thought I would as well share it with everyone.
More specifically, how to display a real time map and/or speed dashboard on top of the footage.
Many possibilities to do it and it really depends on how much time you want to spend doing it, what device(s) you use to capture data, and what final result you want.
Easy and automatic
The simplest and easiest way is to use the wonderful App called Vidometer, by HitCase, available on Apple iPhone. Hitcase also sell state of the art action cases for iPhone that are shock-proof and waterproof, among other accessories like all sorts of mounts for instance. That Vidometer App allows you to record your action in a video, and the result will be a video with user-customizable maps and speeds displayed on top.
There is an article in french which introduces on video telemetry. If you’re interested, you can give it a read.
Incrustation de données gps dans une vidéo
Now let’s go a little bit further into how I made the video. Not using Vidometer.
The principle is to record GPS data or (any) other data in real time with a device (in my case an iPhone, but it could be a dedicated GPS device, and or some activity tracker, whatever), and use that recorded data to match it with a video footage. The collected real-time (GPS position, heartbeat, whatever) data would be graphically represented (i.e. on a map, a speedometer, a dash) and that piece of graphics would be then merged on top of the original video footage.
Here is how I do it. There are probably many other ways, and better ways that I haven’t discovered yet. Any comment and advice are welcome!
Recording video and GPS data
- The footage was shot with the wonderful GoPro Hero 4 Session. I chose this device against a classic GoPro Hero 4 because of the small form factor (just a small cube) and the fact that it’s waterproof without a case. Although the performance and quality is a little under what’s possible on a “big” GoPro, the product is really better than any competitors on the market (for this size). The camera is mounted to the bike’s handlebar. So far, the camera has never failed me. Never stopped recording in the middle of the action no matter the rain and the shocks.
- At the same time, the commute was recorded with Strava. It is a social App that allows to record all your efforts (Running, riding the bike…) and to virtually compete with other “athletes”. The App is really cool, fast, easy to handle and featured. Among cool features are the awesome “segment” function which allows to compete on small parts that you go through a lot; another cool feature is the flyby, which shows who of other Strava athletes you came across during an effort.
Creating the dash overlay
- You’ll need a chroma key video. Here is how to do it in Apple Final Cut Pro X (FCPX). Start FCPX, create a new Project. In the empty storyline, drag a background generator, make it plain, green or blue. Select the new clip in your storyline, hit CTRL+D, enter the new duration (must exceed the total duration of your GPS track recording, of course). Then export the video.
- Open your recorded activity in Strava, decide a starting point and an end point that fit your video, and trim the tracklog. The easiest is to locate places where you stopped. This makes it easier to synchronize later.
- Export the GPS tracklog in Strava. To do so, just add “/export_gpx” to the URL of your Strava activity. For instance : http://www.strava.com/activities/586126046/export_gpx. The export will produce a GPX file which is a standard file for GPS tracklogs. Or use the wrench menu, and export GPX.
- Download and install the Excellent shareware called DashWare. You’ll need a Windows PC or a PC Emulator (such as Parallels, Oracle VirtualBox or VMWare Fusion) in order to perform this task. I personally use VMware Fusion out of habit, but Oracle VirtualBox is equally good for the task, and it’s free and open source.
- In Dashware, load the video file (chroma key video) you previously exported from FCPX, and then load the GPX Track. Then synchronize the GPS track with the Chroma Key video, define start and end, and chose your Dash type (avoir to use the green color in your Dash if your Chroma Key video is green). For details, just have a look at the very good video tutorials made by Dashware. Then export the video. The result will be a green video with an animated dash on it (i.e. speedometer). Note: you can also import all sorts of other data such as heart-rate and add as many dashes as you want on your screen.
Merging using Chroma Key
There is a very good guide at Apple that describes how to use Chroma Key. Check it out. Basically here is how to proceed.
- Create a new empty project in FCPX
- If you use a GoPro camera, the action video footage is split in 12 minutes clips (by default). Just import all the clips into the FCPX event and add all of the clips to the Project’s empty storyline. Make sure they are in the right consecutive order, then select all of them (keyboard shortcut Apple Key+A), then CTRL+Click on the selected clips to show the context menu, and choose “create compound clip“. Name it “Action Footage Clip“, for instance. Then remove everything from the storyline to make it empty again (Apple Key + A, then Delete/Backspace). The compound clip you just created is now available in the browser and remains so even if you empty the timeline.
- In the Timeline, add the foreground clip (Dash clip you just created with DashWare) to the primary storyline.
- Your video compound clip “Action Video Footage” in the story line just under the Dash Clip.
- Select again the Dash clip (the foreground clip), and chose the “keyer” effect using the Effect button. Drag the effect on top of the Dash Clip. The “keyer” effect will detect the “green” color automatically and remove it. Otherwise, you will need to adjust it manually, as explained in the guide.
The Final Cut
- The foreground and the background on the timeline are linked together. Make sure that they are both well synchronized by dragging the background right or left according to your needs. to be sure to synchronize the Dash Clip and the Action video footage properly, the best way is to locate places where you stopped. There, the speed displayed on the Dash must be 0. Just beware that there is a little latency on speeds recorded by GPS, especially on Smart Phones.
- Once you’re happy with the synchronization of your clips, just create a new Compound Clip out of them by selecting them both, CTRL+Click on them, and “create compound clip”. Then empty the timeline again, and add the new compound clip in the Storyline.
- From here you can cut parts you don’t want, add transitions, effects, titles, music…