Trace an animated route over a map


I am new to shortcut, apologies if it has been posted but cant find anything like this. Looking into create a trace rout over a Google map image on version 20. Found it is possible on earlier versions using overlay html but this version doesnt have it anymore.

Any ideas how I can do the trace animated? Creating a documentary of my grandmother and wanted to show how they moved from country to country while she is speaking.

Thank you

Even with the Overlay HTML (Text: HTML) filter what you are trying to do would be a tall order. How much detail do you want, e.g:

  • Do you want to trace along the roads that they drove, or do you just want to draw a single straight line from where they were on day 1 to where they arrived on Day2?
  • Do you want the trace lines to crawl along as your grandmother speaks, or jump from A to B at the beginning/end of that section she is speaking about (like a slideshow)?

Google maps has a feature to let you plot out routes, I used it for the trips my wife and I did in New Zealand a few years ago, but it is quite fiddly to use and is not very interactive.

One guy had a similar request on the forum (for a motorbike ride). He solved it by capturing the GPS data as he rode along and importing it into Google Earth to create a KML file that he could then play back, record the screen and syncing it with the motorbike footage in Shotcut. See here:

Vous pouvez obtenir le résultat suivant de manière pas très compliquée.

You can obtain the following result in a not very complicated way.

1) Mettez un clip de couleur rouge sur V1
2) Metteze la carte sur V2 avec l’itinéraire tracé (par exemple Google Maps)
3) Recadrez la carte sur V2 si nécessaire (Crop Source)
4) Appliquez un filtre Chroma key: simple sur V2 en choisissant la couleur de l’itinéraire. Il devient rouge (couleur de V1)
5) Appliquez un filtre Mask: simple toujours sur V2 que vous faites déplacer avec des images clés. Réglez le paramètre sur “Ajouter”

Voici le fichier mlt

  1. Put a red colored clip on V1
  2. Put the map on V2 with the route traced (for example Google Maps)
  3. Crop the map to V2 if necessary (Crop Source)
  4. Apply a Chroma key: simple filter on V2 by choosing the color of the route. It becomes red (color of V1)
  5. Apply a Mask filter: simple always on V2 that you move with key images. Set the parameter to “Add”.

Here is the mlt file (534.7 KB)


Thank you, I will review it in the next couple of days.

Thanks a lot Namna, I will try this solution in the next couple of days. Unfortunately at the hospital on a mom’s emergency at the moment.

But definitely will try it.

Ingenious. Quite elegant in its simplicity.

I really like this solution. The method works really well so long as the direction of travel is always generally in the same direction, though it gets only a little more complicated if say your travel was East for while then North-West then South. It would become more difficult, though not impossible, to handle any points where the path crosses itself.

1 Like

Merci. Vous avez raison, c’est un peu plus compliqué quand le parcours n’est pas rectiligne. Il faut cacher chaque portion avec son propre masque et faire disparaitre un par un chaque masque avec des images clés.

Thanks, you’re right, it’s a bit more complicated when the course is not straight. You have to hide each portion with its own mask and make each mask disappear one by one with key images.

Pour les trajets plus compliqués il y a peut-être une autre solution, mais c’est plutôt à vous de nous dire si c’est possible.
Je pense Ă  la solution suivante:
1/ Importer la carte Google
2/ Appliquer le filtre “Chroma Key: Avanced” en cochant la case “inverser”.
On a alors le trajet seul.
3/ Exporter l’image.
4/ L’ouvrir dans Inskape. Si vous pouvez définir les points de cette courbe, il suffira alors d’appliquer la procédure que vous nous avez expliquée dans un autre post.


7/ Importer le mp4 dans Shotcut et appliquer au clip “carte” un “Mask: From file” avec ce mp4.

For more complicated journeys there may be another solution, but it’s up to you to tell us if it’s possible.
I am thinking of the following solution:
1/ Import the Google map
2/ Apply the “Chroma Key: Advanced” filter by checking the “Reverse” box.
We then have the path alone.
3/ Export the image.
4/ Open it in Inskape. If you can define the points of this curve, then just apply the procedure you explained in another post.

7/ Import the mp4 in Shotcut and apply a “Mask: From file” with this mp4 to the clip “card”.

Great minds think alike. I was eating breakfast this morning and thought “I’m an idiot”! Here is this person asking how to animate a path on a map and I’ve spent the last week or so working on a way to animate SVG paths. Doh!

I have just finished doing exactly this and will put the result up shortly. I’ll explain how I did it then.

@Damibal, @Namna,

I finished this little project. I had quite a few interruptions, but if I could have done it in 1 go I believe it would have taken less than an hour. The result is shown below

Basically I did the following:

I got a google map of Cyprus in the browser and used Windows Snippet to do a capture of the image and saved it as a PNG. (you could use Sharex or any other screen-snapshot utility)

I imported the PNG into Inkscape and used the Freehand Drawing tool to create the paths.

I then used my “Animated SVG Path” tool to animate the paths and recorded the animation in OBS. (you could use Sharex or any other screen-recording utility) Et Voila!

Having done it I see there is a possible use for another utility, more tailored towards these types of path animations on maps. I had to edit the SVG file manually to get the paths in the correct order and the speed of drawing the individual paths could be improved. I’ll look into this and put some better instructions on my webpage.


@namna, your first solution is really cool and I doubt I would have thought of doing that. Also cool is your SVG solution. Looking forward to seeing @elusien’s next brilliant invention!! :heart_eyes:

See above.

My goodness, we posted at EXACTLY the same time!! Spooky!

Just brilliant. Looks great! PS I’ve just used your SVG tool to add text to my new video. Just about to post a preview on YouTube. I’ll post the link on your SVG animation thread shortly.

En rédigeant mon précédent post, j’étais bien sûr que vous alliez trouver une solution.
Cela n’a pas failli, je n’ai qu’un seul mot:
Bravo @Elusien , félicitations :clap: :+1:
J’espère que les utilisateurs Mac pourront utiliser votre technique.

When I wrote my previous post, I was sure that you would find a solution.
It didn’t fail, I have only one word:
Bravo @Elusien , congratulations :clap: :+1:
I hope that Mac users will be able to use your technique.

It should be fine on a Mac, Inkscpe 1.0.2 is available on Windows, MacOS and Linux, as is OBS Studio and although Sharex is not supported there are several screen-capture programs that are.

This is why i like to develop apps using HTML/CSS&Javascript, since these are available on every platform.

J’ai essayé Inkscape, mais j’avoue que ce n’est pas évident quand on a l’habitude d’un autre logiciel de dessin vectoriel.
Actuellement, j’essaie de comprendre OBS, mais si ce n’est que pour enregistrer une capture d’écran, Quicktime sur OSX sait le faire.
C’est dommage que Shotcut ne puisse plus utiliser les fichiers .html suite à la suppression de WebVfx, mais j’ai encore un peu d’espoir quand je vois le code dans un fichier .mlt comprenant un filtre “Rich: Text”
Si ce n’est pas du html, cela lui ressemble.

I’ve tried Inkscape, but I must admit that it’s not easy when you’re used to another vectorial drawing program.
Currently, I’m trying to understand OBS, but if it’s only to save a screenshot, Quicktime on OSX can do it.
It’s a shame that Shotcut can’t use .html files anymore after the removal of WebVfx, but I’m still a little hopeful when I see the code in an .mlt file with a “Rich: Text” filter.
If it’s not html, it looks like it.

<property name="shotcut:filter">richText</property>
      <property name="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Verdana'; font-size:54pt; font-weight:600; color:#ffffff;&quot;&gt;Texte Ă©crit avec Text: Rich&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</property>
      <property name="shotcut:animIn">00:00:00.000</property>

Rich Text is HTML (4, not 5), but only a small subset provide by Qt, which Shotcut uses. The subset can be seen here:

tt has a subsystem called The Qt WebEngine module which provides a web browser engine that makes it easy to embed content from the World Wide Web into a Qt application.

Qt WebEngine provides C++ classes and QML types for rendering HTML, XHTML, and SVG documents, styled using Cascading Style Sheets (CSS) and scripted with JavaScript. It is based on the same Chromium software that is used to create browsers like Google Chrome and Microsoft Edge.

Unfortunately it appears that Dan would have to put an awful lot of effort into Shotcut to use it. However, if he did, it would effectively resurrect a (better?) version of WebVfx.

You don’t have to use Inkscape for your SVG files. You can use Adobe Illustrator, Affinity Designer, any other SVG editor, or in fact just a text editor to create the raw XML file. I’ve used Inkscape in the past and the fact that it is open-source is a big plus.

Here is another way, where not the path itself is animated but only a red dot as you travel along:

Its all done in Shotcut and Google Earth, but its quite a work with many keyframes for the animation of the dot.