How to make cycling videos with Google Maps GPS Track overlays

23:58 Adrian 0 Comments

Summary: This guide will provide all of the steps I use to create the cycling route videos which have data overlays (Latitude/Longitude, Date/Time, Speed) and a Google Maps GPS track overlay that also has the Cycling layer turned on.

I also note all of the devices, websites and software used for this site and project. And provide tips on resolving various issues and requirements.


Details:

1. Get an action video camera that simultaneously captures accurate GPS data like the Garmin Virb Elite. Or use a GPS bike computer in addition to a video camera
The key to combining video with an accurate GPS-based map position overlay is to capture accurate GPS data.
- If you have an existing accurate GPS tracking device (e.g. Garmin GPS bike computers) then this is sufficient. Smartphone GPS tracking is too inaccurate to make correct tracks.
- I didn't have an existing GPS tracking device and so bought an action video camera that included a GPS tracker: the Garmin Virb Elite. The latest version is called the Garmin Virb XE. Sony, Contour and Ricoh also integrate GPS with their action cameras but I went with Garmin as it has been making cycling and GPS devices for a long time, has various related free software (client and web app) and is supported by lots of third party sites (RideWithGPS, etc).

See:
> Garmin VIRB product range
> DC Rainmaker - Garmin VIRB Elite review

2. Record steady video from a fit-for-purpose handlebar mount not helmet mount
A helmet mounted camera will move around too much as you ride and look around, so a handlebar mount is best. The handlebar mount accessory for the Garmin Virb Elite has too many pieces and is clunky. I made my own handlebar mount out of headlight handlebar brackets, 3M-style hook and loop tape and rubber bands.

The key is to consistently keep the same field of vision for all similar videos. Thus the mount should be level and pointed horizontally so as to capture the most useful picture (enough of the road and enough of the distance and streetscape). Ensure the mount doesn't shift (e.g. camera tilts down) while riding over bumps. I refined my DIY mount to prevent this shifting while riding.

I also bought a 32Gb MicroSD card and find this is sufficient as I regularly upload and then remove old recordings. According to these GoPro estimates the recording time for a 32Mb SD card is:
- 720p (30 fps): 8h 09m
- 1080p (30 fps): 4h 21m

See: My Point of View Cameras:Action Camera Memory Cards Explained

The settings I use for the Garmin Virb Elite are:

Setup
- Video mode: Economy HD (720p 16:9 30fps)
- Field of View: Ultra-zoom
- Loop: Off
- Auto-record: Off
- Microphone: On
- Format: NTSC

Advanced
- Lens Correct: On
- Stabiliser: On

The files stored whenever I record a route with my Garmin Virb Elite are:
- The video file as .MP4 format
- The GPS track as .GPX format
- A sensor data file in .FIT format (GPS, power, heart rate, cadence, speed, etc)

See:
> Web Bike World: Garmin VIRB Review

3. Obtain as accurate GPS and trip data as feasible
It can take quite a bit of time to make the finished videos and there's little point if the video position doesn't match the map position or the key overlay data (Latitude, Longitude) is wrong.

Tips:
- Turn on your GPS device at least 15 seconds before you start recording otherwise the start of the recording may be inaccurate
- Wherever buildings, trees or other structures may obscure the sky, your GPS track data may be unavoidably affected at some points. I have noticed this in downtown Melbourne. It does get back on track afterwards though.
- I haven't found any automated GPS track cleaners that can auto-fix the occasional squiggles. If you know of one let me know at loboadrian AT gmail

See: RideWithGPS - Why is my GPS data sometimes wrong?

4. Download VIRB Edit and connect Garmin camera to import the video and GPX files. Create a video with trip data overlay (date/time, latitude, longitude, speed, gradient, altitude)
VIRB Edit is free Garmin software that can be used with any video and data files to create data overlays (e.g. speed, altitude, latitude, longitude, etc).

See:
> Garmin VIRB Edit
> Garmin VIRB Edit Download

If you don't have a Garmin camera the import process won't automatically pair the correct video with the correct GPX and FIT files. You can use the Virb Edit software to associate the correct GPX/FIT files with the video (e.g.if recorded with a GPS bike computer).

As video editing software, VIRB Edit is very basic so I only use it to transform the raw video into video with a useful cycling data overlay.

I modified one of the standard gauge templates to remove unnecessary gauges (cadence, power) and add the useful ones (latitude, longitude, date/time). I then reuse this template each time I transform a new video.


My VIRB Edit Export Settings:
- Resolution: HD 720p
- Target Quality: Medium
- Frame Rate: 30fps


Notes on current VIRB Edit software deficiencies:
- The current version of VIRB Edit doesn't allow you to change the date format but this will be fixed in a future version.
- The Latitude and Longitude are only displayed in degrees, minutes, seconds when decimal format is much preferred. There is no news on when this option will be available. In the meantime, when needing to convert to decimal I use FCC - Degrees Minutes Seconds to/from Decimal Degrees

It would be ideal if VIRB Edit allowed useful Google Maps GPS Track overlays but it doesn't due to map licencing reasons. You could screen record the side-by-side view but the map doesn't allow the Cycling layer to be turned on and the video would be be very wide and far from ideal.


Hence, the next step is to screen record the Google Maps GPS Track separately and then use proper video editing software to do a Picture-in-Picture overlay.

Exporting the VIRB Edit video with data overlay also creates a matching GPX file at the same time.

5. Clean up GPX files if necessary with GPS Track Editor software
For some recorded trips you'll want to trim the start or end of the GPX track. I use free GPS Track editing software to do this visually on a map.


See:
> GPS Track Editor

6. Upload clean GPX files to RideWithGPS
I've identified that a free RideWithGPS account provides a suitable way to screen record the Google Maps GPS Track with the Cycling layer on.

The first step is to upload the clean GPX file to RideWithGPS. You can view mine at the link below.

RideWithGPS - Adrian Lobo's Activities

At Google Maps zoom level 18 (three less than max) a useful screen recording of the route can be made of the route, street names and the Google Maps Cycling layer (turn RideWithGPS Bike Paths ON). RideWithGPS allows the GPX route to be played back and the focus to auto-centre on the route position.


7. Use screen recording software (e.g. Camtasia Studio) to capture the RideWithGPS map track
The most suitable video editing software include powerful screen recording tools. I use Camtasia Studio's screen recording tool to do this. It produces .TREC files that can be imported when making a new video.

Tips:
- I set a custom dimension aiming to occupy around 20% of the video real estate. However, I choose the width vs height dimensions to suit the main direction of travel.
- While RideWithGPS allows a playback speed of more than 1X I've found that trying to later sync it back to the video is problematic if more than 1X speed is used to record.
- The key note is that RideWithGPS 1X is slightly faster than 1X. Hence, when doing the video sync you'll typically need to set the RideWithGPS recording to play back at 86% of its speed.


See:
> Camtasia Studio

Note: Camtasia Studio costs a few hundred dollars so its best to see if fit for purpose using the 30 day trial version. If I find a suitable free screen recording and video editing software product I will add it here.

8. Take an overview screen capture of the RideWithGPS route for use at the start of the video
This isn't essential but it is handy to include a map overview of the entire route in the first few seconds of the video.

I take a screen capture of the RideWithGPS route (at appropriate zoom level) and save the .JPG for use in the final video.


9. Create the finalised video using suitable video editing software (multiple tracks, Picture-in-Picture). Sync the video to the map playback
To make the finalised video you need video editing software that can create a Picture-in-Picture effect to overlay the Google Maps GPS Track in the top right of the video recorded from your camera.

I've used Camtasia Studio so far during the free trial but may switch to cheaper software. The main steps using Camtasia Studio are:

- Import Media > Import the video with trip data overlay (e.g. See Step 4 above using VIRB Edit). Drag to Track 1

- Import Media > Import the RideWithGPS map track recording (Camtasia Screen Recorder stores these as .TREC files. Drag to Track 2. Set Clip Speed to 86% as RideWithGPS routes play slightly faster than 1X so need to be slowed down.

- Import Media > Import the RideWithGPS route overview screen capture image. Drag to Track 3. Position right at start and select Track 1 and 2 together to drag them right to start after Track 3 finishes. Resize image to take up the full dimensions (typically 1280 x 720). Set Duration to desired timeframe (I use 3 seconds).

- The majority of video editing time involved is syncing the Track 1 video with the Track 2 Google Maps route position. I check the positions at intersections and when the ride is stopping/starting and then need to move Track 2 slightly left or right of Track 1 to obtain the optimum alignment. I often also have to trim parts of the video and/or RideWithGPS recording from the start or end to have a clean, combined video.

- Unfortunately, the RideWithGPS clip speed delta is 86.x% and Camtasia doesn't let you set Clip Speed to that fine grain so the longer the video the greater the gap in positioning that will occur between the start and the end. I recommend keeping typical video recordings to 45min or less for this reason. You can always join them up later.

- Due to this 86.x% clip speed issue my longer videos typically have the GPS position slightly ahead at the start of the video and it ends up slightly behind by the end of the video. This is preferable to it being precise at the start and substantially behind by the end.


File Sizes:
- The VIRB Elite camera captured 12min 48sec of the Canning St route at 720p 30fps and it took 832Mb.
- The VIRB Edit software exported at Resolution of HD 720p, Target Quality of Medium, Frame Rate of 30fps and the file size was 523Mb
- For Camtasia Studio I use the "MP4 only (up to 720p)" quality setting and the file size was 423Mb.


Given I upload the finalised file to YouTube and then delete it, it is possible one could optimise the export/quality settings to reduce file size further so that YouTube uploading was faster. Currently, I err on the side of uploading higher quality as YouTube playback supports the user using the Settings option to switch from Standard resolution (480p) to HD (720p). This is useful when high quality screenshots need to be taken or there are details only visible in the HD version (e.g. vehicle licence plate numbers, street sign writing, etc).

10. Check the finalised video and upload to YouTube
I play the finalised video to check it is ok and then upload to my IBikedHereWithGoogleMaps YouTube account and channel.


- I prefer not to add annotations, audio or other effects in order to make the raw videos and data overlays available for anyone to use under a Creative Commons licence.
- Where desired you can make duplicate videos which you may wish to add annotations, audio and other edits to. This option is found from Edit Video > Enhancements > Save as new video


11. Auto-sync GPX tracks from RideWithGPS to Strava, Garmin Connect, etc
In order to use GPX-related functions or ride tracking not available on RideWithGPS you will need to upload your GPX files to the other web apps (e.g. Strava). You can do this manually but it saves time to find a tool to automate this.

I use the SyncMyTracks Free Android app to auto-upload my RideWithGPS GPX files to Strava. Strava and 3rd party Strava-integrated sites/apps provide some useful ways of displaying routes and GPX data.

12. Create single map of all IBHWGM video routes completed using Strava Multiple Ride Mapper
If you want to see all of your related GPX routes on a single map this can be done using the Strava Multiple Ride Mapper. After syncing my RideWithGPS GPX files to Strava I then use this mapper to create a live collated map which is linkable.

To separate my I Biked Here With Google Maps routes from the rest of my Strava trips I add a prefix (IBHWGM) to these Strava activities. I can then use the Strava Multiple Ride Mapper "Keyword" filter to chart only the desired IBHWGM videos.


See:
> Strava Multiple Ride Mapper

13. Where optimal video quality is needed, take screenshots or excerpts from the videos with trip data overlay (e.g. date/time, latitude/longitude) before deleting source videos

I don't have the hard disk space to keep hundreds of gigabytes of raw video files or production files. Once I upload the finalised video to YouTube I then delete the raw video and the intermediary files (VIRB Edit data overlay version, Camtasia RideWithGPS recording, Camtasia final video export).

However, even when switching YouTube playback settings to HD (720p) you'll notice that YouTube videos lose significant detail compared to the original raw videos due to these videos going through three processing/conversion/export steps. See:  IBikedHereWithGoogleMaps YouTube account and channel

Hence. before I delete all source videos/files I capture any desirable video excerpts and screenshots from the high quality source video with trip data overlay (VIRB Edit export).

For example, below is a screenshot from the higher quality video excerpt I made of a car illegally parked in the La Trobe St bike lanes. The licence plate is more legible here than in the YouTube video even at HD quality: La Trobe St (Docklands to East Melbourne) - starting from 4min 54secs



Further Info:

DC Rainmaker
Handy Tools & Apps Page