Jump to content
Sign in to follow this  

Garmin subtitle generator (uses XML methods)

Recommended Posts



One of my first projects so maybe a little rough around the edges. This project takes a Garmin .tcx file, and generates a .srt subtitle file with it. This is useful for people who want to add their Garmin sports GPS data to their helmet cam or on-board cam videos.

Here's an example that prompted me to develop this tool: http://youtube.com/watch?v=3EGVubTBAGE

The field order, description and format are fully customizable by way of an ini file. I used arrays to be able to dynamically generate the display order. The program also uses some XML functions from the _XMLDomWrapper.au3 (included in the zip file). The XML handling was a major PITA, due to not getting the namespace right at first.


Firstly, the display of the subtitles has to be configured through the .ini file. Normally, it will be necessary to set the offset value to sync the data with the video.

If tcx2srt is started without a file name, it will open a dialog to let you choose the Garmin .tcx input file. The output file will be saved at the same location under the same name, but with an .srt file extension.

The resulting .srt file can be used to show logged data in subtitles when viewing the video (requires VobSub directshow filter). You can also mix them into the video permanently with a tool like VirtualDub or AutoGK (beginners). When you plan to edit the video, I recommend to mix them in permanently before you start cutting. This will make it easy to maintain subtitle sync.

Further reading:





Edit: took the code out of the article, since it was pretty lengthy and is included in the zip file anway...


Edited by Avee

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.