ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: blaster88 on September 13, 2020, 09:19:04 PM

Title: Garmin DriveAssist 50
Post by: blaster88 on September 13, 2020, 09:19:04 PM
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>
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on September 13, 2020, 09:19:52 PM
I can attach a video if necessary.  Have searched and not found an answer. 
Title: Re: Garmin DriveAssist 50
Post by: Phil Harvey on September 13, 2020, 11:00:18 PM
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
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on September 14, 2020, 12:07:22 AM
It's 72 mb let me see how small it will zip.
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on September 14, 2020, 12:20:52 AM
I emailed you a link to a google drive share

Thanks! 
Title: Re: Garmin DriveAssist 50
Post by: StarGeek on September 14, 2020, 01:15:14 AM
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.
Title: Re: Garmin DriveAssist 50
Post by: Phil Harvey on September 14, 2020, 10:43:15 AM
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
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on September 14, 2020, 11:14:51 AM
Thanks not sure if the error is the reason it doesn't find any gps data or not. 
Title: Re: Garmin DriveAssist 50
Post by: Phil Harvey on September 14, 2020, 11:49:25 AM
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
Title: Re: Garmin DriveAssist 50
Post by: Phil Harvey on September 15, 2020, 10:13:27 AM
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
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on September 15, 2020, 08:00:45 PM
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.) 


Title: Re: Garmin DriveAssist 50
Post by: Phil Harvey on September 15, 2020, 09:40:06 PM
Yes please.  If you send me a link to the Speak Plus sample I'll take a look at that too.

- Phil
Title: Re: Garmin DriveAssist 50
Post by: Phil Harvey on September 16, 2020, 08:58:38 AM
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
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on October 05, 2020, 02:57:19 PM
I see the new one is out let me see how it goes! 
Title: Re: Garmin DriveAssist 50
Post by: blaster88 on October 05, 2020, 03:04:25 PM
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