Inserting GPS information into video

Started by hontik, December 14, 2023, 04:52:16 AM

Previous topic - Next topic

hontik

Hello, guys!
I tried different options, but couldn't find something suitable for my task.

Could you please say, what set of commands I need to use, to insert GPS information from the .gpx file into .mp4 file?
I mean not just set init GPS coordinates of the video (where the video was started), I mean the full GPS track.

I had .gpx file with something like that
<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.0"
 creator="ExifTool 12.40"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="http://www.topografix.com/GPX/1/0"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<number>1</number>
<trkseg>
<trkpt lat="26.29682" lon="50.17292">
  <time>2023-12-06T12:07:06Z</time>
</trkpt>
<trkpt lat="26.29675" lon="50.17287">
  <time>2023-12-06T12:07:07Z</time>
</trkpt>
<trkpt lat="26.29679" lon="50.1729">
  <time>2023-12-06T12:07:08Z</time>
</trkpt>
<trkpt lat="26.29684" lon="50.17293">
  <time>2023-12-06T12:07:09Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>

I need a set of commands with which I can insert this information into .mp4 file. In the next steps, it has to be possible to extract this track from the .mp4 file with the command exiftool -p gpx.fmt -ee myfile.MP4 > track.gpx

Phil Harvey

ExifTool does not have the ability to write timed GPS to a video file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

hontik

Hello, Phil.
Thank you for the answer.
Maybe you heard about any other tool with this option?

Phil Harvey

I don't think that one exists, but if you find one let me know.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

The problem is that, for intents and purposes, there isn't a usable standard* for embedding a GPS track in a video. Currently, exiftool can extract 66 different ways of embedded a GPS track and there are several more ways that can be seen in the file but have yet to be decoded.

* There is a standard created by Google, but there isn't an actual program that will embed the data.  At least, not that I've found.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

hontik