ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: borism on November 14, 2023, 04:44:43 AM

Title: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: borism on November 14, 2023, 04:44:43 AM
Here is a sample video file (https://www.dropbox.com/scl/fi/gzvbka336e81iyvrt3sjw/20230619151551_0006030A.MP4?rlkey=2xvr1u6x3jfljz7vawscu20me&dl=0) from the ABASK A8 4K Dashcam. I can see that it has GPS data because I see a map and a moving location indicator when I play the video using the HIT GPS player on mac (https://apps.apple.com/us/app/hit-gps-player/id1527858255?mt=12) (I believe it is also available for windows). However exiftool is unable to parse the GPS data. Would it be possible to add support for this?

Thank you so much!
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: Phil Harvey on November 14, 2023, 08:13:08 AM
Thanks for the sample.

Unfortunately this camera uses the increasingly-more-common encrypted LIGOGPSINFO format.  I have wasted too much time already trying to decode this, and welcome anyone else to have a bash at it (use exiftool -ee -v4 to see all of the data in hex).

However, there is a proprietary library (libsungps.so) that will decode this, and someone has built a open-source wrapper around this to extract the GPS -- see here (https://github.com/YuzhongHuangCS/GPSParser).

- Phil
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: borism on November 15, 2023, 05:44:40 AM
I see - thank you so much for the quick reply Phil. Is there any way the open-source wrapper could be called by exiftool for these types of videos to generate the gpx output? Maybe as an optional parameter?
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: Phil Harvey on November 15, 2023, 06:58:32 AM
Unfortunately libsungps.so is not portable.  ExifTool is platform independent.

Also, I'm sure there would be copyright issues that would prevent me from distributing that library.

- Phil
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: StarGeek on November 15, 2023, 12:12:09 PM
It's hard to tell from that github page, but I'm under the impression that libsungps.so is only for Android.  So it wouldn't be possible to use it on any other system anyway.
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: Phil Harvey on November 15, 2023, 03:41:10 PM
Quote from: StarGeek on November 15, 2023, 12:12:09 PMIt's hard to tell from that github page, but I'm under the impression that libsungps.so is only for Android.

I got that impression too, although I couldn't find where the system requirements were stated.

Ah, but I can use ExifTool:

> exiftool libsungps.so
ExifTool Version Number         : 12.70
File Name                       : libsungps.so
Directory                       : .
File Size                       : 42 kB
File Modification Date/Time     : 2023:11:14 08:16:52-05:00
File Access Date/Time           : 2023:11:14 00:00:00-05:00
File Inode Change Date/Time     : 2023:11:14 08:16:52-05:00
File Permissions                : -rwxrwxrwx
File Type                       : ELF shared library
File Type Extension             : so
MIME Type                       : application/octet-stream
CPU Architecture                : 32 bit
CPU Byte Order                  : Little endian
Object File Type                : Shared object file
CPU Type                        : Unknown (40)
File Extension                  : so
File Type Description           : ELF shared library

Hmmm.  Unknown CPUType 40.  After some googling, this is an Arm architecture.  I'll add this (and a bunch more) CPUTypes to ExifTool.

- Phil
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: borism on November 16, 2023, 04:26:22 AM
Super - does that mean that this might be supported in future ExifTool releases?
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: StarGeek on November 16, 2023, 08:39:43 AM
Not likely unless someone can decode the format.  Phil's post was about giving exiftool the ability to properly identify files such as the libsungps.so library.  It also more or less verified that the library was for Android and wouldn't work on a desktop PC.

A google search on libsungps.so only pulls up two links.  The Github one posted above and a post in these forums which was probably the source started the creation of that wrapper.
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: borism on November 20, 2023, 08:50:28 AM
I see, so what user implication does Phil's comment of "I'll add this (and a bunch more) CPUTypes to ExifTool." have? Will it just be about giving users an error message? Or will users be able to do something useful once that CPUType is added?

It also looks like there are 2 ExifTool apps for Android?
https://play.google.com/store/apps/details?id=com.exiftool.free
https://play.google.com/store/apps/details?id=net.xnano.android.exifpro
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: StarGeek on November 20, 2023, 10:21:59 AM
Quote from: borism on November 20, 2023, 08:50:28 AMI see, so what user implication does Phil's comment of "I'll add this (and a bunch more) CPUTypes to ExifTool." have?

On your video, nothing. The change will allow more details to be extracted from executable file types such as the libsungps.so.  It's a tangential post from your original post.
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: Phil Harvey on December 10, 2024, 12:00:22 PM
I have managed to figure out the decryption used in this video, and ExifTool 13.07 will extract the timed GPS.

- Phil
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: borism on March 26, 2025, 05:41:50 AM
Amazing! Thank you as always for all your help Phil!
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: nickp on March 26, 2025, 06:21:52 AM
Hi! We're using the latest version (13.25) to try extracting GPS data from ABASK A8 4K Dashcam videos and we don't see any GPS data in the output (for example, for the video in the original post). This is the command we're trying to use:
exiftool 20230619151551_0006030A.mp4 -api largefilesupport=1 -X -ee -G3 -n Are there any other parameters we're missing? Thanks!
Title: Re: Feature request: Parse GPS from ABASK A8 4K Dashcam
Post by: Phil Harvey on March 26, 2025, 07:05:10 AM
When I run your exact command with 13.25 I get an output XML file with lines like this:

<LIGO:GPSDateTime>2023:06:19 20:16:49</LIGO:GPSDateTime>
 <LIGO:GPSLatitude>51.3174102656</LIGO:GPSLatitude>
 <LIGO:GPSLongitude>3.625208664</LIGO:GPSLongitude>
 <LIGO:GPSSpeed>101.046996485</LIGO:GPSSpeed>
 <LIGO:GPSTrack>236.8</LIGO:GPSTrack>
 <LIGO:GPSAltitude>0.0</LIGO:GPSAltitude>
 <LIGO:Accelerometer>-0.84 0.34 0.40</LIGO:Accelerometer>
 <LIGO:GPSDateTime>2023:06:19 20:16:50</LIGO:GPSDateTime>
 <LIGO:GPSLatitude>51.31727989976</LIGO:GPSLatitude>
 <LIGO:GPSLongitude>3.6248740968</LIGO:GPSLongitude>
 <LIGO:GPSSpeed>100.861589152</LIGO:GPSSpeed>
 <LIGO:GPSTrack>239.2</LIGO:GPSTrack>
 <LIGO:GPSAltitude>0.0</LIGO:GPSAltitude>
 <LIGO:Accelerometer>-1.02 0.04 0.54</LIGO:Accelerometer>

But I wouldn't recommend XML output for this.  If you're thinking it is GPX compatible, it isn't.  You would have to do something like this to output GPX:

exiftool -ee -p gpx.fmt FILE

Using this gpx.fmt file (https://raw.githubusercontent.com/exiftool/exiftool/refs/heads/master/fmt_files/gpx.fmt).

- Phil