I use a KDlinks dashcam (which creates .mov files) and have been successful at extracting the GPS data into a valid/working gpx file. The file size for a 3 1/2 minute movie is about 26Kb.
I also us a mini 0806 dashcam that records in the same movie format, .mov files. I have used the same exiftool command line and fmt file on the .mov files from the mini0806 camera, and while the output gpx file will open in a gpx viewer, it contains no gps location (track) data. The output file for the 5 minute movie is less than 1Kb.
When I run the exiftool command on the mini0806 movie there are no errors displayed of any kind. The only output, besides the gpx file with no track data, is "1 directories scanned" and "1 image files read".
I ran the following command (found on this forum) on both movie files and captured the output into a file for each movie.
exiftool -v2 -s -time:all movie.MOV
These files are attached. (kdlinks-works.txt and mini0806-notwork.txt).
The exiftool ver 11.44 command used on both movies (one at a time) was (from a bat file):
exiftool -ee -a -fileOrder gpsdatetime -p gpx.fmt /movie > out.gpx
The .fmt file I used for both movies is also attached (gpx.fmt)
I have also attached the "mini0806.gpx" file from the mini0806 that has no track data.
If you have any ideas or suggestions on what may be the problem, I would appreciate it.
The fmt file you attached is empty. Regardless, the output of -time:all isn't telling us much as it doesn't let us know whether or not you 0806 dashcam actually contains gps data (readable by exiftool).
Can you share a short dashcam video, that will allow us to investigate better.
Sorry about the .fmt file being empty. Not sure what happened.
I have attached a short movie from the mini0806.
I have pasted the .fmt file in this message at the bottom. This .fmt works with the kdlinks movies.
The mini0806 movie file shows the gps Lat & lon on the screen when you play the movie. It is overlaid on top of the movie.
mini0806 movie file attached.
Thanks for looking at this, I appreciate it.
#------------------------------------------------------------------------------
# File: gpx.fmt
#
# Description: Example ExifTool print format file for generating GPX track log
#
# Usage: exiftool -p gpx.fmt FILE [...] > out.gpx
#
# Requires: ExifTool version 10.49 or later
#
# Revisions: 2010/02/05 - P. Harvey created
# 2018/01/03 - PH Added IF to be sure position exists
# 2018/01/06 - PH Use DateFmt function instead of -d option
#
# Notes: 1) Input files must contain GPSLatitude and GPSLongitude.
# 2) Add the -ee option to extract the full track from video files.
# 3) The -fileOrder option may be used to control the order of the
# generated track points when processing multiple files.
#------------------------------------------------------------------------------
#[HEAD]<?xml version="1.0" encoding="utf-8"?>
#[HEAD]<gpx version="1.0"
#[HEAD] creator="ExifTool $ExifToolVersion"
#[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
#[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[HEAD]<trk>
#[HEAD]<number>1</number>
#[HEAD]<trkseg>
#[IF] $gpslatitude $gpslongitude
#[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
#[BODY] <ele>$gpsaltitude#</ele>
#[BODY] <time>${gpsdatetime;DateFmt("%Y-%m-%dT%H:%M:%SZ")}</time>
#[BODY]</trkpt>
#[TAIL]</trkseg>
#[TAIL]</trk>
#[TAIL]</gpx>
That is a MKV video (Matroska), not MOV (QuickTime). ExifTool doesn't yet extract timed GPS from MKV videos, but with more information I may be able to add support for this. Is there an app that will display the timed GPS metadata? If so, could you tell me where I can get the app, and all of the information it displays for the first GPS position of the video (in case I can't run the app)? Thanks.
- Phil
Thanks for the quick reply.
I need to ask a question before I check on the question you asked.
Originally the mini0806 recorded the movie with a MOV extension. It was way too big to post.
So I used "avidemux" to edit the movie to a smaller size. The default extension in avidemux was MKV, as you mentioned. I saved the file with a MOV extension because I thought it was the same format.
I am not sure if the mini0806 movie was originally a mov format and avidemux changed it, or if the original mini0806 movie is really an MKV, and named incorrectly by the dashcam as a MOV.
Are you familiar with avidemux to know if it changed the format, or is there another way I can edit the original mini0806 movie file and not change the format?
Sorry for the confusion. I'm just not at all familiar with movie formats.
I need an original video sample. Editing the video will delete the metadata in most cases.
If you can upload a full video somewhere (dropbox.com for example) then post or email a link (my email is philharvey66 at gmail.com), I will see what I can do.
- Phil
I have sent you an email with a link to an original movie file from the mini0806 dashcam on dropbox.com
Thanks very much for the help.
OK, here you go. The GPS in this video is stored as subtitle text (similar to the way DJI does it, but the text is formatted differently). The attached config file will allow you extract the GPS from the Mini 0806 MOV video with this command:
exiftool -config mini0806.config -p gpx.fmt -ee FILE
- Phil
Edit: Updated config file to fix hemisphere problem in lat/lon
You Nailed It.
Very impressive that you scripted something so FAST to extract the gpx file.
Just one small issue in the output gpx file. In the location data it shows Longitude as "E" East, instead of "W" west.
My location is Atlanta Ga., same place the movies were recorded.
The numeric coordinates are correct, just the "E" reference is incorrect.
I looked at the mini0806.config but cannot really see anything that refers to "E" or "W". I do not understand the script at all.
Hope it is a minor issue.
Thanks for helping on this. The tool is very helpful to me, and I appreciate it very much.
Right, thanks. I've updated the config file in my last post with a version that handles the hemispheres properly.
- Phil
That change did it.
My sincere appreciation for the effort on this. It is most helpful to me, and I do appreciate it.
One final question: You mentioned the mini0806 format is similar to the DJI format.
Would the same config (mini0806.config) work for the DJI movie files?
The full ExifTool distribution contains a config file that decodes the DJI subtitle text. It is in a different format from the Mini0806.
DJI example:
F/3.5, SS 1000, ISO 100, EV 0, GPS (8.6499, 53.1665, 18), D 24.26m, H 6.00m, H.S 2.10m/s, V.S 0.00m/s \n
Mini0806 example:
A,270519,201555.000,3356.8925,N,08420.2071,W,000.0,331.0M,+01.84,-09.80,-00.61;\n
I will be including mini0806.config in future full ExifTool distributions.
- Phil
On a final note: Did I tell you how much I appreciate you, your efforts and the exiftool?
Thanks very much!!
You're welcome!
I have one more question after reviewing the gpx file created from the mini0806 dashcam.
Below is a short section of the gpx file. Notice that for each time stamp and position, that info repeats 9 times
before a new time and position is recorded. During this segment of the movie, the car was always in motion at about 30 mph (never stopped).
Could this be because of the way the mini0806 records the info vs the way the kdlinks records the data?
5/26/2019 1:25:00 PM 100 ft 47 ft 0:00:01 137 mph 236° true N33 57.140 W84 18.996
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 0 ft 0:00:00 0° true N33 57.121 W84 19.029
5/26/2019 1:25:01 PM 100 ft 47 ft 0:00:01 32 mph 262° true N33 57.121 W84 19.029
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 100 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 99 ft 0 ft 0:00:00 0° true N33 57.120 W84 19.038
5/26/2019 1:25:02 PM 99 ft 47 ft 0:00:01 32 mph 260° true N33 57.120 W84 19.038
5/26/2019 1:25:03 PM 99 ft 0 ft 0:00:00 0° true N33 57.119 W84 19.047
What you have posted is not a GPX file, but I think I get the point. It is likely that the device samples the accelerometer at 10 times per second, and writes old GPS data at each of these measurements until a new GPS fix is obtained after 1 second.
- Phil
Thanks for the reply. You were right, what I posted was the output from the garmin app that reads the gpx file and plots track on a map.
I think your comment on what is happening makes a lot of sense, and explains the issue.
Thanks.