News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Extracting GPS data from MP4 video file

Started by fakej, December 31, 2017, 11:58:10 AM

Previous topic - Next topic

gmc

Thanks again Phil. Looks like I'm getting closer but now all the output files contain is:

"gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
gpx.fmt
"

When ExifTool ran here's the output:

""C:\Program Files (x86)\GeoSetter\tools\exiftool.exe" -config my.config -p gpx.fmt -ee -ext mp4 -w OUTDIR/%f.gpx 20190908
    1 directories scanned
    1 directories created
   11 image files read
   11 output files created"

gmc

Moved gpx.fmt and my.config but getting output without any GPS info:

"<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.0"
creator="ExifTool 10.96"
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>
</trkseg>
</trk>
</gpx>
"

Phil Harvey

can you confirm that this output shows GPSLatitude and GPSLongitude for the files?

"C:\Program Files (x86)\GeoSetter\tools\exiftool.exe" -ee "-gps*" 20190908

- 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 ($).

gmc

Hi Phil,

I'm only getting the following output from that:

"C:\Program Files (x86)\GeoSetter\tools\exiftool.exe" -ee "-gps*" 20190908
======== 20190908/GRMN0007.MP4
======== 20190908/GRMN0008.MP4
======== 20190908/GRMN0009.MP4
======== 20190908/GRMN0010.MP4
======== 20190908/GRMN0011.MP4
======== 20190908/GRMN0012.MP4
======== 20190908/GRMN0013.MP4
======== 20190908/GRMN0014.MP4
======== 20190908/GRMN0015.MP4
======== 20190908/GRMN0016.MP4
======== 20190908/GRMN0017.MP4
    1 directories scanned
   11 image files read

Phil Harvey

That would explain why there are no coordinates in your gpx file.  ExifTool isn't extracting GPS from these files.

If you believe that they do contain GPS, send me a sample and I'll see what I can do to add the ability for ExifTool to extract it.  My email is philharvey66 at gmail.com

- 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 ($).

gmc

OK, I've sent a sample file over to you using WeTransfer.com

Thanks

Phil Harvey

I got the sample.  The commands work for me with Exiftool 11.65.  Try updating to the most recent version of Exiftool.

- 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 ($).

call-151

Hi, I am trying to create a .gpx from an .mp4 generated with a Viofo A119v3 dashcam.
I run this command in the folder with my mp4 files:

exiftool -ee "-gps*" 20190928*

and the output is:

======== 20190928080711_004253.MP4
======== 20190928081009_004254.MP4
======== 20190928081443_004257.MP4
======== 20190928081743_004258.MP4
======== 20190928082043_004259.MP4
======== 20190928082343_004260.MP4
======== 20190928082643_004261.MP4
======== 20190928082943_004262.MP4
======== 20190928083243_004263.MP4
======== 20190928121041_004265.MP4
======== 20190928121342_004266.MP4
======== 20190928121642_004267.MP4
======== 20190928121942_004268.MP4
======== 20190928122242_004269.MP4
======== 20190928122542_004270.MP4
======== 20190928130716_004273.MP4
   16 image files read

Do I need a special my.config file like gmc needed for his Garmin?
Running on Windows with exiftool version 11.67.
Thanks.


Phil Harvey

Can you send me a (hopefully small) video sample?  My email is philharvey66 at gmail.com

- 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 ($).

call-151

Thanks for taking a look, Phil. I've also sent a file using wetransfer.com. Sorry the file is a bit big but I wanted one with actual driving vs. just parked.
Cheers

Phil Harvey

I got the sample, thanks.

I can see the GPS in the file, but it is in a different format than recognized by ExifTool.  I'll see what I can do about adding support for this format, and post back here if I need anything else from you.

If I am successful, there will then be 32 different formats of streaming GPS recognized by ExifTool.

- 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 ($).

Phil Harvey

Success!  And ExifTool 11.68 has just been released to support this new format.

- 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 ($).

call-151

Yes!! Thank you Phil!  Works like a hot damn! :)
I had to get rid of the <course> and <speed> elements out of the .gpx file so it would load into my old Mapsource software but now I can see where I have driven.
For those following along, I put the gpx.fmt file into the same folder as exiftool.exe and ran the command like this:

exiftool -p gpx.fmt -ee -ext mp4 -w OUTDIR/%f.gpx d:\Carvids_Trips\misc\20190928080711_004253.mp4

Phil Harvey

...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 ($).

gmc

Thanks again Phil, I can confirm that it's also working for me with version 11.65