Possible to extract GPS from Sony Video?

Started by dougransom, September 03, 2013, 01:52:16 PM

Previous topic - Next topic

saltmakrell

Sorry for opening up this topic but I'm quite interested in extracting GPS data from .mov files generated by dashcams.

I have a DOD LS460W camera and I've been able to extract the sections of the .mov file which contains the GPS track (quite sure).

I've saved all these sections here: http://osm.beebeetle.com/sections/    Please open with a hex-viewer.
One file per section - and each of the sections seems to correspond to one position-recording in the .gpx file exported from Registrator. Every section ends with a huge number of zeros.

The problem now is that I'm not able to find out the encoding of the data within each section. I'm just wondering if anyone here are able to recognise something from these dumps.

Regards,
Ruben

Phil Harvey

Hi Ruben,

I took a quick look, but didn't see anything I recognized.

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

saltmakrell

Thanks Phil,

I will continue investigating.

Ruben

saltmakrell

Hi,

I've come a bit further with it, but now I'm stuck again. What I know for sure is that these sections do contain the GPS track. I've tried to copy these section only from one MOV file to another and programs such as Registrator is then tricked to believe the GPS track comes from the other file.

I've also tried to manipulate each of the bytes in the array and then I've found out exactly which bytes that influence the latitude, longitude, the velocity and the heading (course).

See the attached image. The first 40 bytes contain the string   "GPS  P "  then  "x xx" and then "00000"

Then there are sequences of 52 bytes where byte 22-24 contain the letters "ATC",  30-32 contains the letter "001",  manipulating either of byte 18-20 influences the latitude, 26-28 influences the longitude, 36-38 the velocity and 40 the heading. (See the last line on the image)

The letters S M L corresponds to small influence (few hundred meters), medium influence (few 10s of kilometers), large influence (several 1000 kilometers).

Still, for every new line on the image, the values seem to change rather randomly, so I'm quite confused.

Can someone recognise something here?

Regards,
Ruben

saltmakrell

I should also add that for each file (in my first posting) there are 30 such 52 bytes segments. For each new file, only 5 of the segments change.

So for instance:
First file:
A1
A2
A3
A4
A5
B1
B2
B3
B4
B5
C1
C2
C3
C4
C5
D1
D2
D3
D4
D5
E1
E2
E3
E4
E5
F1
F2
F3
F4
F5

Second file:
G1
G2
G3
G4
G5
B1
B2
B3
B4
B5
C1
C2
C3
C4
C5
D1
D2
D3
D4
D5
E1
E2
E3
E4
E5
F1
F2
F3
F4
F5

Third file:
G1
G2
G3
G4
G5
H1
H2
H3
H4
H5
C1
C2
C3
C4
C5
D1
D2
D3
D4
D5
E1
E2
E3
E4
E5
F1
F2
F3
F4
F5

etc.


(sorry for long post..)

Phil Harvey

ExifTool 10.72 (just released) has the ability to extract GPS from MOV/MP4 videos using the -ee option, but unfortunately there are many ways that this information may be stored, and I am currently working on supporting as many as possible.  Please send me a sample if it doesn't extract it for your camera (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 ($).

Phil Harvey

I've just released ExifTool 10.84 with the ability to read timed GPS from a few more dashcam models, including (finally!) the format that Ruben described here.

Use the -ee option when running ExifTool on a video file to see the embedded GPS.

This version of ExifTool extracts 6 different types of GPS stored in MOV, MP4 and M2TS videos.

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