Format of GPS data embedded in MOV files

kbs

New Member
Joined
Jan 7, 2016
Messages
1
Reaction score
8
Country
Uganda
This is admittedly very geeky, so please skip the rest unless you happen to be interested in such things :)

I dug into how the SG9665GC embeds GPS data into the MOV files it generates, and documented what I found at https://github.com/kbsriram/dcutils. It was enough to write some Go scripts to extract GPX files from the SG9665GC MOV files. All this "works for me" at firmware rev SG20151109.V2 and I offer no more assurances than that - but if nothing else, I hope the info gives a head start should you find a need to dig into it.

Of course, all this was to have an easy scriptable way to get at the GPX data and generate visualizations of interest, so can't resist showing off a fun experiment. Ssa subtitles permit vector graphics, so in combination with some open street map data it's possible to turn GPX tracks into a map-based "subtitle." This gif was made using ffmpeg to render the subtitles from a few seconds of a night drive.

DsO2zAf.gif
 
This is admittedly very geeky, so please skip the rest unless you happen to be interested in such things :)

I dug into how the SG9665GC embeds GPS data into the MOV files it generates, and documented what I found at https://github.com/kbsriram/dcutils. It was enough to write some Go scripts to extract GPX files from the SG9665GC MOV files. All this "works for me" at firmware rev SG20151109.V2 and I offer no more assurances than that - but if nothing else, I hope the info gives a head start should you find a need to dig into it.

nice work, thanks for sharing
 
Of course, all this was to have an easy scriptable way to get at the GPX data and generate visualizations of interest

Very cool. I don't suppose you can shed some light on the process of obtaining and embedding the map information into the video? This would be great to have as a one-step script to
  1. Get the GPX files
  2. Trim and concatenate videos as necessary
  3. Fetch map data from online (open street map/google/whatever)
  4. Add map subtitles (or possibly embed a transparent animation of the map data in the corner of the video)
 
I hope the info gives a head start ...
Thank you for taking the trouble to document your work. So helpful. I'm a rookie geek new to Go but was able to use your script as is to extract the GPS data from .mov files recorded by my B40 A110 dashcam. The computer I use is a Raspberry Pi with Go installed from apt-get. The GPS data extraction is remarkably quick.
 
This is admittedly very geeky, so please skip the rest unless you happen to be interested in such things :)

I dug into how the SG9665GC embeds GPS data into the MOV files it generates, and documented what I found at https://github.com/kbsriram/dcutils. It was enough to write some Go scripts to extract GPX files from the SG9665GC MOV files. All this "works for me" at firmware rev SG20151109.V2 and I offer no more assurances than that - but if nothing else, I hope the info gives a head start should you find a need to dig into it.

Of course, all this was to have an easy scriptable way to get at the GPX data and generate visualizations of interest, so can't resist showing off a fun experiment. Ssa subtitles permit vector graphics, so in combination with some open street map data it's possible to turn GPX tracks into a map-based "subtitle." This gif was made using ffmpeg to render the subtitles from a few seconds of a night drive.

DsO2zAf.gif
 
Thanks again for sggps. It works on the Nextbase 312GW (and probably other models) with earlier firmware. But it seems that something has changed with the latest firmware.

I hope the manufacturer might explain the new format, otherwise I may try hacking.

If sucess, do you want to accept revisons?
 
Well if I run sggps on a MOV file generated from earlier firmware, I get the expected gpx track.
Doing the same on a MOV file written by the 312GW with the latest firmware produces a gpx file with all the lat/long coordinates at zero (even after the gps signal has been acquired).
So the offset of the gps data has presumably changed.

As I said, I haven't looked further as yet. I have read the sggps sources, and it looks fairly straight forward, but I am new to Go. It will take a while to experiment and see if I can work out what has changed. I was hoping that someone here would know about that change in the particular Nextbase MOV format. I really was not expecting the firmware to modify that!
 
no problem, sorry my misunderstanding, SGGPS is the part number of our GPS, author of this program used the same name when he wrote the program, you could try contacting him with a sample file maybe
 
no problem, sorry my misunderstanding, SGGPS is the part number of our GPS, author of this program used the same name when he wrote the program, you could try contacting him with a sample file maybe
 
It is probably my fault for posting here about the Nextbase unit on this thread about your dashcams. But it seemed the natural place. It seems that you and Nextbase used the same format until recently. Maybe you OEM for both...
 
I don't have any connection with their products, the format is often the same for models that use the same chipset, there are probably other models that would work with this software as well, not sure what Nextbase may have changed or why, if anything the changes might be something to do with their playback software
 
Back
Top