DJI Osmo Action 4 GPS information

Started by kayasaman, April 11, 2024, 08:33:51 AM

Previous topic - Next topic

kayasaman

Hi,

I have an Action4 action camera from DJI with the remote controller which provides GPS information which I believe gets embedded into the video file itself rather then using a separate text file to store the data....

At present I have attempted to use the command:

exiftool -p /usr/share/perl-image-exiftool/fmt_files/gpx.fmt -ee  -api largefilesupport=1 -ext MP4 -w %f.gpx .
to extract the information into a GPX file.

Unfortunately there seems to be nothing written in the GPX file other then the standard XML markup.

If I add the -V3 option I get much more output:

Unknown meta format (dbgi)
Track4 Type='meta' Format='dbgi', Sample 51624 of 51642 (7335 bytes)
4019372eb: 12 a4 39 0a a1 39 0a 0a 10 a1 cd cb b9 05 18 d6 [..9..9..........]
4019372fb: 94 03 12 25 08 35 12 21 4f 56 34 38 43 34 30 5f [...%.5.!OV48C40_]
40193730b: 42 49 4e 32 5f 34 30 33 32 5f 33 30 32 34 5f 35 [BIN2_4032_3024_5]
40193731b: 30 30 30 50 5f 43 50 48 59 1a 28 08 4e 12 24 54 [000P_CPHY.(.N.$T]
40193732b: 50 4c 47 5f 4f 56 34 38 43 34 30 5f 56 49 44 45 [PLG_OV48C40_VIDE]
    [snip 7255 bytes]

which by the looks of it seems like the meta information is not supported?


I am just uploading a sample video file right now to my GDrive and will post it here once ready as it will take some time as it's quite large and will post once ready.


Can anything be done in EXIFTool in order to read the output I wonder?


Many thanks.

kayasaman

Here's a sample video:

https://drive.google.com/file/d/10CvcltTMcmF6grNbJYWikVOzC6xCrQac/view?usp=sharing

kayasaman

Hi, I wonder if there is any feedback on this?

Is it possible or do I need to use another tool like Telemetry Extractor?

StarGeek

This will require Phil's attention. It looks like I tried everything you did and I got the same, empty results.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

I haven't yet seen 'dbgi' information like this, but I'll see what I can do.

- 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 taken a more in-depth look.  There is unknown timed 'djmd' metadata as well as the unknown 'dbgi', and one tonne of each.  A lot of it looks like telemetry data (accelerations for example), but I haven't been able to find the GPS yet.  This will take some time.  I'll post back here if I discover anything.

What type of information are you able to see in this file using the DJI software?

- 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 spend a few hours on this now.  I can decode 7 accelerometer readings from the 'djmd' data, but I don't think this decoding is reliable enough to include in ExifTool.  The problem is that they are using variable-length integers in their records, and the byte positions of the data change whenever one of these variable-length values rolls over.  Also, there are many different record types, and all of them require a-priori knowledge of the record length.  So the data cannot be parsed if you don't know the length of one of the records.

I've looked for GPS coordinates, but I seriously doubt that this is written in the video.  I can't see anything that looks like GPS.

If anyone has any detailed information about the 'dbgi' or 'djmd' information, please let me know and I'll see about adding the ability to decode this.

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

Lrk

Hi Phil,

If it helps, DJI released a whitepaper in 2020 named "DJI Media File Metadata WhitePaper" (https://developer.dji.com/onboard-sdk/documentation/introduction/announcement.html).

In part 3, chapter 3, they say they used Google Protocol buffer for timed metadata in videos.
They also provide protobuf schemas with the whitepaper zip archive.

Lrk

#8
I did some test with the protobuf schemas provided with the whitepaper.


Extracted video stream 2 (djmd) from an osmo action4 video which was recorded with the osmo remote control, provinding GPS + other sensors data.

The protobuf schema seems imcomplete or outdated and i can't find any recent version.

some fields are deserialized correctly if i tinker with offsets but, as-is it's pretty much useless.

Lrk

After a few hours of tinkering, i did manage to read the djmd track and data seem legit.

I can confirm that it's protobuf, but the schema is far more complex than in the whitepaper and is device dependent, or at least device type dependent.

In the start of the track data there is a protobuf file name present that will need to be processed in order to know the correct protobuf schema.

the dbgi track seems to be debug data and is also protobuf, but i did not find the schema for that one but the telemetry is present in the djmd track.

Lrk

Quote from: kayasaman on April 11, 2024, 08:50:30 AMHere's a sample video:

https://drive.google.com/file/d/10CvcltTMcmF6grNbJYWikVOzC6xCrQac/view?usp=sharing

the link is down, would you like to share it again ?
i'd like to try with videos other than mine.

Phil Harvey

Could you send me some details about what you have done?  Either post here or email philharvey66 at gmail.com

I would re-up the other sample for you but it is 4GB in size and I don't have enough time to do it right now.  Maybe tonight.

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

Lrk

Quote from: Phil Harvey on October 01, 2024, 04:11:42 PMCould you send me some details about what you have done?  Either post here or email philharvey66 at gmail.com

I would re-up the other sample for you but it is 4GB in size and I don't have enough time to do it right now.  Maybe tonight.

- Phil

Email sent.

Don't bother to reupload 4Gb of video, just a small 5sec will be enough,if you use ffmpeg copy.
 

StarGeek

Quote from: Lrk on October 01, 2024, 05:08:12 PMDon't bother to reupload 4Gb of video, just a small 5sec will be enough,if you use ffmpeg copy.

ffmpeg will strip away any GPS (and EXIF) data. The problem is that there really isn't a standard for embedding a GPS track in a video* Currently, exiftool reads 74 77 different ways that a GPS track can be in a video and there are about half a dozen more in which the format hasn't been decoded. I have yet to find a program that will embed a GPS track into a video file.

* Technically, there is a standard by Google, but nobody follows it, and I've never found any software that write this format. I mention it in this Exiftool forum's post.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

cosmo