Garmin DriveAssist 50

Started by blaster88, September 13, 2020, 09:19:04 PM

Previous topic - Next topic

blaster88

Using exiftool 12.06 on windows 10. 

Garmin DriveAssist 50 saves mp4 files with embedded gps data.  It is overlayed on the video at the bottom with date time lat long speed.  There is an app on the GPS itself, if you view the file in the GPS, includes a map. 

command

exiftool -ee -p gpx.fmt GRMN0015.mp4

Result:

<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.0"
creator="ExifTool 12.06"
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>
Warning: Sample size error - GRMN0015.mp4
</trkseg>
</trk>
</gpx>

blaster88

I can attach a video if necessary.  Have searched and not found an answer. 

Phil Harvey

Yes. Please attach a link to a sample MP4 (don't attach the file itself), or email it to me: philharvey66 at gmail.com

Thanks.

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

blaster88

It's 72 mb let me see how small it will zip.

blaster88

I emailed you a link to a google drive share

Thanks! 

StarGeek

Quote from: blaster88 on September 14, 2020, 12:07:22 AM
It's 72 mb let me see how small it will zip.

Ron Howard Narrator Voice: It won't.

Videos are already highly compressed.  You really can't squeeze anymore compression out of them.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

I got the file, thanks.  I've take a quick look, but I will have to do some digging to figure out why it is giving this warning.

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

blaster88

Thanks not sure if the error is the reason it doesn't find any gps data or not. 

Phil Harvey

The error is preventing ExifTool from reading the timed text metadata, which may contain the GPS -- I have to get past the error before I can see that.

- 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

Got it.

There is a bug in the way Garmin writes the metadata in these files.  The stsc box for the metadata track indicates that there are 60 samples per chunk, and the stsz box indicates that there are 60 samples.  So logically there should be only 1 chunk, but the stco box lists offsets for 60 chunks.  This is an error, and ExifTool aborts with a "Sample size error" when it tries to process the samples in the second chunk (which doesn't exist).  I'll patch this so it just stops processing chunks instead of aborting, and this will allow ExifTool to process the GPS samples in your video.

But there is another problem:  Garmin has changed the way they store GPS samples, and have added a new 4-byte size word at the start of each data record.  I'll also add a patch to skip over the size word in the GPS record if it exists.

The bottom line is that ExifTool 12.07 (to be released within a week or two) will be able to extract the GPS from the file you sent.

Thanks for this report, and for the sample video.

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

blaster88

Wow, excellent!   I will look forward to it! 

Since we are on the topic - I have another Garmin DashCam which is a Speak Plus.  The videos from it look the same as the one I provided - time and lat long in the footer of the video.  Exiftool does not give a sample size error for that, but it also doesn't output the gps data.  Would you be interested in that file also?   That one is not important to me, but thought you might be interested to see yet another way gps is encoded (my quess is that they fixed the sample issue, the dashcam being a couple years newer, but still encode the same way.) 



Phil Harvey

Yes please.  If you send me a link to the Speak Plus sample I'll take a look at that too.

- 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

#12
I got the sample, thanks...

This model properly indicates 1 chunk per sample, so it doesn't give the "Sample size error", but the GPS sample has a leading 2-byte word at the start of the GPS sample not 4 bytes as with the DriveAssist 50.

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

blaster88

I see the new one is out let me see how it goes! 

blaster88

Aha! 

C:\installs\exiftool>exiftool -ee -c "%.7f" -gps* -time:all GRMN0016.MP4
GPS Latitude                    : 38.8702030 N
GPS Longitude                   : 77.3363821 W
GPS Speed                       : 42
GPS Speed Ref                   : mph
GPS Date/Time                   : 2020:09:14 01:07:29.000Z
GPS Latitude                    : 38.8703507 N
GPS Longitude                   : 77.3362800 W
GPS Speed                       : 42
GPS Speed Ref                   : mph