The GPS Text filter allows you to add useful GPS related data (such as speed, altitude or distance) on top of and in sync with your video. It is available since version 21.08.
Note: you need to record your GPS track with a device (phone, smartwatch, bike computer or dedicated GPS tracker) AND export your track to a .gpx or .tcx file. If you record using an action camera that has GPS (like GoPro), you need to extract the data to a separate file (there are online and offline tools for this).
Tip: hover your mouse over filter elements for some extra explanations
Add the GPS Text filter on a clip in the timeline.
Click the Open file button in the filter panel to load the .gpx or .tcx file.
Use the GPS offset row to sync the GPS track time to the video time (check out some hints below; if you’re extremely lucky they are already in sync and you can skip this step).
Edit the filter text panel with any keywords from the available list. You can also format the text to your liking just like Text: Simple filter.
Tip: hover your mouse over the list for extra keyword arguments.
Check out the results live in the video player.
If needed, change the more advanced options in the filter panel. There is also basic keyframing support for in/out and text position/size.
TLDR: watch out for timezones; buttons have tooltips; remember to film a clock from time to time for easy sync later (but do remember it’s timezone);
Also: scrollwheel to add/substract a few seconds for quick corrections.
At the very bottom of the filter panel (you’ll probably need to scroll to see it) there are 2 important date-time notes: the Video’s and the GPS’s start times (Note: they will be first updated after you load a GPS file). The GPS time is always in the UTC timezone, but the Video start time is read from the file’s Creation Time metadata field, which is currently very not-standardized across devices, and so, it might be in your local timezone or not, it might be set to the start or end of the video or it might just be a very random time if your device loses power and doesn’t sync it at startup.
The important thing to remember here is that no matter when you shot your video, this is what Shotcut sees as your file’s start time (converted to UTC, so the same as GPS time) therefore this is what will be used for offseting the GPS track. You can use the #file_datetime_now# keyword to see it live in the output.
Syncing the GPS track to the video file will be the most annoying part of using this filter. To the right of the sync text areas there are a number of 4 buttons that will probably cover 95% of all use cases thus avoiding any need for doing time math. This will be frustrating at first but you will notice that there is a pattern to follow and it will be the same everytime for each device.
Note: if your device doesn’t support auto time sync over the internet you will most likely still need to match a few seconds (maybe even minutes) to the real time in addition to one of the helper buttons. I recommend you take a photo of a (digital) clock and check the photo’s properties for the time.
I’ll go over the buttons from left to right, first being the clock one, and last the “Pause” one.
Probably the most used button as I expect most shots that would work with a GPS overlay would come from an action camera and GoPro is doing this as well.
Why? If you can’t set the timezone in the camera clock settings, it will probably be wrongly set to UTC (well it’s wrong unless you live in UTC area) so the file will match the GPS track a few hours ahead or behind.
Devices? GoPros, some DSLRs/Mirrorless, most non professional grade video cameras will have this issue. This is an easy one to find as it will remain constant for all files.
Why? Some devices (cough android phones cough) decided it’s a good idea to set the video’s creation time after you finish recording. So if you record a 15 minute video starting at 12:00, it will store the time as 12:15.
Devices? Android smartphones are the only ones that do this as far as I know.
It’s a big pain as you can’t copy paste the filter to multiple clips, each clip has to be individually updated as it will most likely have a different duration.
If you just want to see the filter work just press this button and it will immediately sync the 2 times no matter how far apart they are.
When? This is good for testing random files or if you don’t want to bother with times and just remember to start recording video and GPS at the same time.
Devices? My dashcam resets the time every time it loses power for more than a few hours. I gave up trying to set it correctly so I just start the GPS track and immediately hit start record.
When? If you want a very precise sync that doesn’t need time keeping at all, this is the way: just start filming before the GPS device and make sure to record the moment the GPS device gets the first fix and starts recording. Move the playhead to that exact moment in the video, press the button and you’re done.
You can also make a sign or cover your camera with your palm as a mark point.
If you clap to sync audio to video this workflow will be very familiar.
Your phone automatically syncs pretty precisely all the time. You can just record it’s clock (make sure you can see the seconds) at any moment and manually match the #gps_datetime_now# time to what you see in the video. This is my preferred method as It’s simply the easiest and you don’t need to preserve file metadata (don’t forget about your clock’s timezone though).
- Crossing the 180th meridian will probably produce ridiculous results for speed/distance. If you have a track feel free to share it with us and I’ll try to fix some things.