GM PDR Data Extraction

Started by JSenek, June 17, 2020, 08:28:28 PM

Previous topic - Next topic

JSenek

GM vehicles such as Corvettes and Camaros can record videos in mp4 format with a wide variety of embedded data, from engine RPM to oil temperature. Would exiftool be an appropriate tool for extracting said data?

I've gotten as far as seeing a few interesting tags such as the following, but want to make sure I'm not trying to fit a square peg in a round hole:
HandlerType                     : Unknown (ctbx)
HandlerDescription              : Marlin PDR 1.0
OtherFormat                     : marl

An example can be found at https://www.dropbox.com/s/rgz9cklhoufqvy5/200513_213223_00005_.mp4?dl=0

Thanks ahead of time to anyone with any advice!

Phil Harvey

This looks interesting, and is something that ExifTool could possibly decode.  I'll take a look at this when I get a chance, but any additional information you can provide would be helpful

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

JSenek

#2
Thanks for taking a look. Is there anything in specific you would like to know?

Edit:
It's possible to view the embedded data with software put out by Cosworth, such as https://www.cosworth.com/toolbox-for-corvette/ . I can also provide lots of other sample files.

Phil Harvey

Unfortunately that software is Windows only.  Could you run it for the file you uploaded and tell me all of the recorded values for the first few samples?  Thanks.

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

JSenek

In one part of the UI, the software displays some values plotted onto a chart, and allows stepping through it with video playback side-by-side. Different data appears to have different polling rates.

The following appear to update in 0.01s increments. Here is the data displayed for the first 10 data points in the UI (0:00.00 - 0:00.09).
Accelerator: -, 13, 13, 13, 13, 13, 13, 13, 13, 13
Brake: 2, 1, 1, 1, 1, 2, 2, 1, 1, 1
Time Delta: No values, and I believe this is calculated anyways.

The following appear to update in 0.1s increments, and thus are not synched with the start of the video. Here are the first 10 data points (0:00.06 - 0:00.96).
Speed: 68.2, 68.2, 68.2, 68.2, 68.2, 68.2, 68.3, 68.3, 68.3, 68.3
Lateral Acceleration: -, 0, 0, 0, 0, 0, 0, 0, 0, 0
Longitudinal Acceleration: -, 0, 0, 0, 0, 0, 0, 0, 0, 0

I have never seen values populate for the following, but they are displayed in the UI in 0.01s increments.
LF Suspension
RF Suspension
LR Suspension
RR Suspension
Yaw Rate

There is yet more data displayed in the UI as only per-lap data. For this, there is obviously only one set, but in other on-track recordings it does display one set per lap. Here is data that is being recorded at unknown intervals:
Min LF Tire Air Temperature: 100
Max LF Tire Air Temperature: 100
Min LR Tire Air Temperature: 97
Max LR Tire Air Temperature: 97
Min RF Tire Air Temperature: 102
Max RF Tire Air Temperature: 102
Min RR Tire Air Temperature: 99
Max RR Tire Air Temperature: 99
Min LF Tire Pressure: 29.6
Max LF Tire Pressure: 30.2
Min LR Tire Pressure: 29.6
Max LR Tire Pressure: 29.6
Min RF Tire Pressure: 30.7
Max RF Tire Pressure: 30.7
Min RR Tire Pressure: 30.2
Max RR Tire Pressure: 30.2
Min Water Temperature: 185
Max Water Temperature: 187
Min Engine Oil Pressure: 36.0
Max Engine Oil Pressure: 37.1
Min Engine Oil Temperature: 185
Max Engine Oil Temperature: 185
Min Transmission Oil Temperature: 163
Max Transmission Oil Temperature: 163
Max Intake Boost Pressure: -5.8

Buried in yet another portion of the interface (ugh) it is possible to see two more readings, but they can only be stepped through by progressing the video feed frame by frame.
Steering Angle: Starts with no value, first value of 3.3 at 0:00.16
Gear Number: Starts with no value, first value of 7 at 0:01.6

Finally, here is some displayed data that I believe is merely calculated:
Lap Time: 0:23.16
Average Speed: 71.08
Max Speed: 72.9
Max Lateral G: 0.00
Time on Accelerator: 0.0
Time on Brake: 0.0

I'm hoping this is a little more thorough then you need. As you can see, there's a lot in there that would be nice to have as a data dump for reformatting for other software.

Phil Harvey

Thanks.  That should be useful.  To decode the acceleration I may need some no-zero values.  What are the first non-zero values for each of these in the file you sent.

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

JSenek

Unfortunately since that was a small recording on the highway, there are no nonzero g-force values.

I do have other recordings with much more active data, but they're ~800-960Mb each. I'd be happy to link one or go take a spirited spin around the block to make a new sample.

Phil Harvey

A small sample would be better.  :)

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

JSenek

Sorry for the delay. I recently returned from Road Atlanta and remembered to grab a few quick samples afterwards. Below is the one I selected for this post.
https://www.dropbox.com/s/tsalggxb347ohfm/200627_184111_00004_.mp4?dl=0

As I began to transcribe some of the data from the selected clip, I realized that it appears that the UI is rounding all displayed timestamps to the nearest 0.01s, while the data is probably actually logged with more precision.

Since this rather complicates data transcription, I've saved the samples to the following spreadsheet: https://docs.google.com/spreadsheets/d/1JCRBaXIRBxwbcZZzjOUY_4OFfQhErxPS_3MKjJc-xoY/edit?usp=sharing

I grabbed the first 10 datapoints per sensor, and then I selected another set of 5 with more "interesting" values.

EDIT: I also wanted to mention that GPS data is also being recorded, but I did not see an easy way to export that information.

Phil Harvey

Great, thanks.  I'll take a look at this when I get a chance... it may be a couple of weeks (summer is busy time for me).

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

JSenek

No expectations here. Thanks a bunch for being willing to take a look. If there's any preliminary work I can do to assist, please let me know. I program for a living, but my area of expertise isn't at all related to this.

Phil Harvey

Wow.  OK.  I stared at this data for about 4 hours yesterday, and finally managed to see some patterns, but I still haven't been able to find the GPS or any other useful tags.

First, the 'mrld' box gives this list, which one might expect to tell us what metadata is available:

1) System Power Mode ()
2) System Backup Power Enabled ()
3) System Backup Power Mode ()
4) Steering 1 Switch ()
5) Steering 2 Switch ()
6) Transport Storage Mode ()
7) Infotain Op Mode ()
8) Valet Mode ()
9) Boost Pressure Ind (%)
10) Coolant Temp (°C)
11) Intake Boost Pressure (kPa)
12) Oil Pressure (kPa)
13) Oil Temp (°C)
14) RPM (rpm)
15) Accel Pos (%)
16) Clutch Pos (%)
17) Brake Pos (%)
18) LF Tyre Pressure (kPa)
20) RF Tyre Pressure (kPa)
19) LR Tyre Pressure (kPa)
21) RR Tyre Pressure (kPa)
22) LF Tyre Temp (°C)
24) RF Tyre Temp (°C)
23) LR Tyre Temp (°C)
25) RR Tyre Temp (°C)
26) Gear ()
27) Trans Oil Temp (°C)
28) Fuel Level (%)
29) Fuel Capacity (ltr)
30) Steering Angle (°)
31) Distance (km)
32) Speed (kph)
33) ABS Active ()
34) Traction Control Active ()
35) Vehicle Stability Active ()
36) Corner Exit Setting ()
37) Speed Request Intervention ()
38) Speed Control Response ()
39) Engine Speed Request (rpm)
40) Engine Torqure Req (Nm)
41) Battery Voltage (V)
42) Lateral Acceleration (G)
43) Longitudinal Acceleration (G)
44) Vertical Acceleration (G)
45) Latitude (°)
46) Longitude (°)
47) Altitude (m)
48) Heading (°)
49) GPS Fix ()
50) Beacon ()


But now the tricky part.  The timed metadata is stored separately in a timed 'marl' box.  It seems to be composed of 8-byte records.  I think the first byte is the tag ID.  ID 0 is a timestamp, but I don't know what the other tags are.  The next 3 bytes are a 24-bit signed integer, usually with small positive or negative values, but I don't know its significance.  The next 4 bytes are a 32-bit unsigned integer value.  Most values are multiples of 10000.  But I can't figure out what any of them mean.

I've included a text dump of the metadata from the 15-second video you sent, organized into section based on the tag ID.  The first two columns of the text output are the 8 bytes displayed as 2 hex words.  The third column is the second word displayed in decimal.  You can see the timestamps in the first section.  Let me know if you have any idea what the other sections mean. 

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

jparrish88

Hi All,

Phil this is awesome. I too am looking to get a hold of some of this raw data. I would love to look at the data indicated by the marl and look to see if it lines up with the Cosworth tool set.

Could you note how you pulled the marl data? I can't seem to get there myself. Any help would be very appreciated. I can also provide several samples of mp4's where data was recorded and provide the dumped information.

If I can get my hands on the MARL data from my videos, I hope to provide you the means to parse the data.

Phil Harvey

Did you want the marl data from the posted video?  Attached are the raw data blocks from that video for 'marl' plus other unknown chunks.

You can extract the marl data in hex form using exiftool -ee -v5 (but note the -v5 output will be very lengthy)

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

oosheixe

much of the info to decode the pdr file is found in the following patent:
https://patents.google.com/patent/US20160307378/en
https://patentimages.storage.googleapis.com/71/28/87/3f66579cb7f7e4/US20160307378A1.pdf

i'm interested in poking through my own pdr data

i've extracted the data stream directly using:
$ ffmpeg -loglevel info -i 200509_130855_00001_.mp4 -map 0:d -c:d copy -f data sensor.dat

looking at my file i see content as follows:
$ xxd -b -c 8 sensor.dat | head -21 | cut -d\  -f-9
00000000: 11100000 00000000 00000000 00100010 00000000 00000000 00000001 11000101
00000008: 00000000 00000000 00000000 00000000 00000000 00000000 00111111 10100000
00000010: 01000001 11111111 11100001 11100101 00000000 00000000 00000000 00000000
00000018: 01000001 11111111 11100001 11000110 00000000 00000000 00100111 00010000
00000020: 01000001 11111111 11100001 11101010 00000000 00000000 00000000 00000000
00000028: 01110001 00000000 00000111 00110000 00000000 00000000 01110101 00110000
00000030: 01010000 11111111 10000001 00000000 00000000 00000000 01001110 00100000
00000038: 01000001 11111111 10000000 11111000 00000000 00000000 00000000 00000000
00000040: 01000001 11111111 10000000 11101011 00000000 00000000 00000000 00000000
00000048: 01000001 11111111 10000000 11110001 00000000 00000000 00000000 00000000
00000050: 11100000 00000000 00000000 00000111 00000000 00000000 00000000 00001001
00000058: 00000000 00000000 00000000 00000000 00000000 00000001 11000110 01000000
00000060: 01111100 00000000 00000000 00000001 00000000 00000000 00000000 00000000
00000068: 01000011 11111111 10001100 00011101 00000000 00000000 00000000 00000000
00000070: 01011010 11111111 11111110 11110101 00000000 00000000 01001110 00100000
00000078: 01110110 00000000 00000000 00000010 00000000 00000000 01110101 00110000
00000080: 01000010 11111111 11000011 10110111 00000000 00000000 00100111 00010000
00000088: 11100000 00000000 00000000 01000010 00000000 00000000 00000000 00001100
00000090: 00000000 00000000 00000000 00000000 00000000 00000011 00100110 01000110
00000098: 11100000 00000000 00000000 00000111 00000000 00000000 00000000 00001001
000000a0: 00000000 00000000 00000000 00000000 00000000 00000011 11000010 00010000

referencing the patent doc section [0033] i believe this data shows:
- a full sensor reading at 00000000 followed by 8 compact sensor readings
- a full sensor reading at 00000050 followed by 5 compact sensor readings
- a full sensor reading at 00000088
- a full sensor reading at 00000098

i'm not sure if exiftool is the correct tool for looking at the sensor data itself,
however in addition to the sensor data itself, the patent indicates that there is
a "a series of lookup tables", including:
-  a Header ('mrlh') box 30.15
-  a Values ('mrlv') box 30.16
-  a Dictionary ('mrld') box 30.17

i think exiftool would be perfect for extracting these fields
i don't know if exiftool can do this today through a combination of flags or if this is something that would need to be coded separately

@PhilHarvey, if it is possible to extract the referenced metadata, would you demonstrate how to do so?

and, thanks for making a such a useful tool
and, thanks for responding and following up to community requests -- it is very refreshing

Phil Harvey

Quote from: oosheixe on October 20, 2020, 07:59:39 AM
@PhilHarvey, if it is possible to extract the referenced metadata, would you demonstrate how to do so?

My last post shows how to extract the marl in hex form.  It can't currently be extracted in binary form (I hacked ExifTool to get the marl.dat file I attached to my last post).

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

oosheixe

Hi Phil,

I was a bit vague/imprecise when I said "the referenced metadata".
Rather than the "marl" sensor data stream, what I am interested in using exiftool to extract is the following metadata fields within the mp4 file:
-  a Header ('mrlh')
-  a Values ('mrlv')
-  a Dictionary ('mrld')

are these able to be accessed via exiftool in its current form?
or is this something that would need to be added into exiftool to be able to print out normally (ie. not hexdump)?

thanks again

Phil Harvey

Yes, these are available with command like this:

exiftool -u -unknown_mrlh -b FILE > mrlh.dat

But most of the interesting stuff is in the marl data, which can't be extracted like 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 ($).

jparrish88

Here's the dictionary mrld decoded (Thanks for the help on this) :


[['Channel Number', 'Channel Quantity', 'Channel Units', 'Units String', 'Flags', 'Interval', 'Min Reading', 'Max Reading', 'Disp Min', 'Disp Max', 'Multiplier', 'Offset', Channel Name', 'Channel Description'],
[1, 0, 0, '', 1, 50000000, 0, 3, 0.0, 3.0, 1.0, 0.0, 'System Power Mode', 'System Power Mode'],
[2, 0, 0, '', 1, 50000000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'System Backup Power Enabled', 'System Backup Power Enabled'],
[3, 0, 0, '', 1, 50000000, 0, 3, 0.0, 3.0, 1.0, 0.0, 'System Backup Power Mode', 'System Backup Power Mode'],
[4, 0, 0, '', 1, 0, 0, 15, 0.0, 15.0, 1.0, 0.0, 'Steering 1 Switch', 'Steering 1 Switch'],
[5, 0, 0, '', 1, 0, 0, 15, 0.0, 15.0, 1.0, 0.0, 'Steering 2 Switch', 'Steering 2 Switch'],
[6, 0, 0, '', 1, 0, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Transport Storage Mode', 'Transport Storage Mode'],
[7, 0, 0, '', 1, 0, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Infotain Op Mode', 'Infotain Op Mode'],
[8, 0, 0, '', 1, 0, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Valet Mode', 'Valet Mode'],
[9, 16, 1, '%', 7, 1000000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Boost Pressure Ind', 'Boost Pressure Ind'],
[10, 4, 1, '°C', 7, 5000000, 0, 255, -40.0, 215.0, 1.0, 233.14999999999998, 'Coolant Temp', 'Coolant Temp'],
[11, 9, 5, 'kPa', 7, 120000, 0, 127, -40.0, 120.0, 1000.0, -40000.0, 'Intake Boost Pressure', 'Intake Boost Pressure'],
[12, 9, 5, 'kPa', 7, 5000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'Oil Pressure', 'Oil Pressure'],
[13, 4, 1, '°C', 7, 5000000, 0, 255, -40.0, 215.0, 1.0, 233.14999999999998, 'Oil Temp', 'Oil Temp'],
[14, 8, 1, 'rpm', 7, 120000, 0, 65535, 0.0, 16383.75, 0.026179938779915, 0.0, 'RPM', 'RPM'],
[15, 16, 1, '%', 7, 120000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Accel Pos', 'Accel Pos'],
[16, 16, 1, '%', 7, 250000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Clutch Pos', 'Clutch Pos'],
[17, 16, 1, '%', 7, 100000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Brake Pos', 'Brake Pos'],
[18, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'LF Tyre Pressure', 'LF Tyre Pressure'],
[20, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'RF Tyre Pressure', 'RF Tyre Pressure'],
[19, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'LR Tyre Pressure', 'LR Tyre Pressure'],
[21, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'RR Tyre Pressure', 'RR Tyre Pressure'],
[22, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'LF Tyre Temp', 'LF Tyre Temp'],
[24, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'RF Tyre Temp', 'RF Tyre Temp'],
[23, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'LR Tyre Temp', 'LR Tyre Temp'],
[25, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'RR Tyre Temp', 'RR Tyre Temp'],
[26, 0, 0, '', 1, 250000, 0, 15, 0.0, 15.0, 1.0, 0.0, 'Gear', 'Gear'],
[27, 4, 1, '°C', 7, 5000000, 0, 255, -40.0, 215.0, 1.0, 233.14999999999998, 'Trans Oil Temp', 'Trans Oil Temp'],
[28, 16, 1, '%', 7, 1000000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Fuel Level', 'Fuel Level'],
[29, 2, 1, 'ltr', 7, 5000000, 0, 4095, 0.0, 511.875, 0.000125, 0.0, 'Fuel Capacity', 'Fuel Capacity'],
[30, 7, 1, '°', 7, 100000, 0, 65535, -180.0, 180.0, 0.0010908307824964562, -35.744343080843876, 'Steering Angle', 'Steering Angle'],
[31, 1, 4, 'km', 15, 50000000, 0, 2147483647, 0.0, 33554431.0, 15.625, 0.0, 'Distance', 'Distance'],
[32, 3, 3, 'kph', 7, 1000000, 0, 32767, 0.0, 511.0, 0.0043402777777777814, 0.0, 'Speed', 'Speed'],
[33, 0, 0, '', 1, 200000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'ABS Active', 'ABS Active'],
[34, 0, 0, '', 1, 200000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Traction Control Active', 'Traction Control Active'],
[35, 0, 0, '', 1, 200000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Vehicle Stability Active', 'Vehicle Stability Active'],
[36, 0, 0, '', 1, 1000000, 0, 16, 0.0, 16.0, 1.0, 0.0, 'Corner Exit Setting', 'Corner Exit Setting'],
[37, 0, 0, '', 1, 120000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Speed Request Intervention', 'Speed Request Intervention'],
[38, 0, 0, '', 1, 120000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Speed Control Response', 'Speed Control Response'],
[39, 8, 1, 'rpm', 3, 120000, 0, 1023, 0.0, 8184.0, 0.83775804095728, 0.0, 'Engine Speed Request', 'Engine Speed Request'],
[40, 15, 0, 'Nm', 7, 250000, 0, 4095, -848.0, 1199.5, 0.5, -848.0, 'Engine Torqure Req', 'Engine Torqure Req'],
[41, 11, 0, 'V', 7, 1000000, 0, 255, 3.0, 28.5, 0.1, 3.0, 'Battery Voltage', 'Battery Voltage'],
[42, 10, 1, 'G', 7, 2000000, -32768, 32767, -97.0, 97.0, 0.02884331898, -1890.2757212919998, 'Lateral Acceleration', 'Lateral Acceleration'],
[43, 10, 1, 'G', 7, 2000000, -32768, 32767, -97.0, 97.0, 0.02884331898, -1890.2757212919998, 'Longitudinal Acceleration', 'Longitudinal Acceleration'],
[44, 10, 1, 'G', 7, 2000000, -32768, 32767, -97.0, 97.0, 0.02884331898, -1890.2757212919998, 'Vertical Acceleration', 'Vertical Acceleration'],
[45, 7, 1, '°', 7, 2000000, 0, 42, -90.0, 90.0, 1.7453292519943297e-09, 0.0, 'Latitude', 'Latitude'],
[46, 7, 1, '°', 7, 2000000, 0, 42, -180.0, 180.0, 1.7453292519943297e-09, 0.0, 'Longitude', 'Longitude'],
[47, 1, 0, 'm', 7, 2000000, -3000000, 3000000, -30000.0, 30000.0, 0.01, 0.0, 'Altitude', 'Altitude'],
[48, 7, 1, '°', 7, 2000000, 0, 36000, 0.0, 360.0, 0.000174532925199433, 0.0, 'Heading', 'Heading'],
[49, 0, 0, '', 1, 2000000, 0, 99, 0.0, 99.0, 1.0, 0.0, 'GPS Fix', 'GPS Fix'],
[50, 0, 0, '', 1, 0, 0, 1000, 0.0, 1000.0, 1.0, 0.0, 'Beacon', 'Beacon']
]


I'd be willing to provide the python I used to get here, if anyone wants it.

oosheixe

i'm interested in the python code you mentioned

would you go ahead and just attach it rather than PM?
that way others can benefit as well

jparrish88

Here's the MRLV decoded. I didn't spend time yet to decode the date and time stamps for their corresponding ISOs.

[[b'id  ', b'strs', ''], [b'time', b'time', '21-32-23'], [b'date', b'date', '2020-05-13'], [b'tstm', b'tstm', [4658689210913863680]], [b'ltim', b'time', '21-32-23'], [b'ldat', b'date', '2020-05-13'], [b'zone', b'strs', 'UNK'], [b'swvs', b'strs', '23258874AQ 0.1'], [b'lang', b'strs', 'en-US'], [b'cntr', b'strs', ''], [b'unit', b'focc', 'usim'], [b'flap', b'tstm',
  • ], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', '']]

jparrish88

Here are the two files I used for just working with the files that were already attached to this Forum Topic. I eventually plan to have this operate out of one file and directly parse from a video themselves. But I'm not there yet, and I wasn't sure how useful it would be yet until I fully understood how to grab each .dat file.

I put an MIT as it's compatible with Phil's license on EXIF.

sidepipe

This is an old topic but has there been any more progress with this? I've been in contact with Phil and sent him another video, and he also pointed me to this thread. Thought I'd better check to see if anyone's got further to avoid him ( and me if I get a chance ) wasting more time than necessary!

Phil Harvey

#23
From the sample that sidepipe sent me, I can decode the mrld and mrlv (see below).  Decoding the timed metadata from the marl data is trickier, but after about 4 hours searching, I think I can finally see where the GPS latitude/longitude are stored.  I still have a lot of work to do, but there is hope that I'll be able to decode this.

mrld data:

Chan Num Fmt Units Flags Interval Min Reading Max Reading Disp Min Disp Max   Multiplier          Offset            Channel Name                        Channel Description
1    16  1   %     7     1000000  0           255         0        100        0.00392157          0                 Boost Pressure Ind                  Boost Pressure Ind
2    4   1   °C    7     5000000  0           255         -40      215        1                   233.15            Coolant Temp                        Coolant Temp
3    9   5   kPa   7     120000   0           255         -128     127        1000                -128000           Intake Boost Pressure               Intake Boost Pressure
4    9   5   kPa   7     5000000  0           255         0        1020       4000                0                 Oil Pressure                        Oil Pressure
5    4   1   °C    7     5000000  0           255         -40      215        1                   233.15            Oil Temp                            Oil Temp
6    8   1   rpm   7     120000   0           65535       0        16383.75   0.026179938779915   0                 RPM                                 RPM
7    16  1   %     7     120000   0           255         0        100        0.00392157          0                 Accel Pos                           Accel Pos
8    16  1   %     7     250000   0           255         0        100        0.00392157          0                 Clutch Pos                          Clutch Pos
9    16  1   %     7     100000   0           255         0        100        0.00392157          0                 Brake Pos                           Brake Pos
10   9   5   kPa   7     10000000 0           255         0        1020       4000                0                 LF Tyre Pressure                    LF Tyre Pressure
12   9   5   kPa   7     10000000 0           255         0        1020       4000                0                 RF Tyre Pressure                    RF Tyre Pressure
11   9   5   kPa   7     10000000 0           255         0        1020       4000                0                 LR Tyre Pressure                    LR Tyre Pressure
13   9   5   kPa   7     10000000 0           255         0        1020       4000                0                 RR Tyre Pressure                    RR Tyre Pressure
14   4   1   °C    7     10000000 0           255         -20      107        1                   253.15            LF Tyre Temp                        LF Tyre Temp
16   4   1   °C    7     10000000 0           255         -20      107        1                   253.15            RF Tyre Temp                        RF Tyre Temp
15   4   1   °C    7     10000000 0           255         -20      107        1                   253.15            LR Tyre Temp                        LR Tyre Temp
17   4   1   °C    7     10000000 0           255         -20      107        1                   253.15            RR Tyre Temp                        RR Tyre Temp
18   0   0         1     250000   0           15          0        15         1                   0                 Gear                                Gear
19   4   1   °C    7     5000000  0           255         -40      215        1                   233.15            Trans Oil Temp                      Trans Oil Temp
20   16  1   %     7     1000000  0           255         0        100        0.00392157          0                 Fuel Level                          Fuel Level
21   2   1   ltr   7     5000000  0           4095        0        511.875    0.000125            0                 Fuel Capacity                       Fuel Capacity
22   7   1   °     7     100000   0           65535       -180     180        0.00109083078249646 -35.7443430808439 Steering Angle                      Steering Angle
23   1   4   km    15    50000000 0           2147483647  0        33554431   15.625              0                 Distance                            Distance
24   3   3   kph   7     1000000  0           32767       0        511        0.00434027777777778 0                 Speed                               Speed
25   0   0         1     200000   0           1           0        1          1                   0                 ABS Active                          ABS Active
26   0   0         1     200000   0           1           0        1          1                   0                 Traction Control Active             Traction Control Active
27   0   0         1     200000   0           1           0        1          1                   0                 Vehicle Stability Active            Vehicle Stability Active
28   0   0         1     1000000  0           16          0        16         1                   0                 Corner Exit Setting                 Corner Exit Setting
33   0   0         1     1000000  0           16          0        16         1                   0                 Driver Performance Mode             Driver Performance Mode
29   0   0         1     120000   0           1           0        1          1                   0                 Speed Request Intervention          Speed Request Intervention
30   0   0         1     120000   0           1           0        1          1                   0                 Speed Control Response              Speed Control Response
31   8   1   rpm   3     120000   0           1023        0        8184       0.83775804095728    0                 Engine Speed Request                Engine Speed Request
32   15  0   Nm    7     250000   0           4095        -848     1199.5     0.5                 -848              Engine Torqure Req                  Engine Torqure Req
45   11  0   V     7     1000000  0           255         3        28.5       0.1                 3                 Battery Voltage                     Battery Voltage
46   10  1   G     7     2000000  4294934528  32767       -97      97         0.02884331898       -1890.275721292   Lateral Acceleration                Lateral Acceleration
47   10  1   G     7     2000000  4294934528  32767       -97      97         0.02884331898       -1890.275721292   Longitudinal Acceleration           Longitudinal Acceleration
48   10  1   G     7     2000000  4294934528  32767       -97      97         0.02884331898       -1890.275721292   Vertical Acceleration               Vertical Acceleration
49   7   1   °     7     2000000  0           42          -90      90         1.74532925199433e-09 0                Latitude                            Latitude
50   7   1   °     7     2000000  0           42          -180     180        1.74532925199433e-09 0                Longitude                           Longitude
51   1   0   m     7     2000000  4291967296  3000000     -30000   30000      0.01                0                 Altitude                            Altitude
52   7   1   °     7     2000000  0           36000       0        360        0.000174532925199433 0                Heading                             Heading
53   0   0         1     2000000  0           99          0        99         1                   0                 GPS Fix                             GPS Fix
54   0   0         1     0        0           1000        0        1000       1                   0                 Beacon                              Beacon
55   16  1   %     6     10000000 0           255         0        100        0.00392157          0                 CPU User                            CPU User
56   16  1   %     6     10000000 0           255         0        100        0.00392157          0                 CPU System                          CPU System
57   16  1   %     6     10000000 0           255         0        100        0.00392157          0                 CPU Free                            CPU Free
58   16  1   %     6     10000000 0           255         0        100        0.00392157          0                 CPU IO                              CPU IO
59   16  1   %     6     10000000 0           255         0        100        0.00392157          0                 CPU IRQ                             CPU IRQ
60   0   0   B/s   0     10000000 0           2147483647  0        2147483647 1                   0                 Disk Read Rate                      Disk Read Rate
61   0   0   Op/s  6     10000000 0           65535       0        65535      1                   0                 Disk Read Operations                Disk Read Operations
62   6   4   ms    2     10000000 0           65535       0        65535      0.001               0                 Disk Read Time                      Disk Read Time
63   0   0   B/s   0     10000000 0           2147483647  0        2147483647 1                   0                 Disk Write Rate                     Disk Write Rate
64   0   0   Op/s  6     10000000 0           65535       0        65535      1                   0                 Disk Write Operations               Disk Write Operations
65   6   4   ms    2     10000000 0           65535       0        65535      0.001               0                 Disk Write Time                     Disk Write Time
66   1   4   km    15    10000000 0           2147483647  0        2097152    0.976573            0                 Recording Event Odometer            Recording Event Odometer
34   3   3   kph   7     500000   0           16383       0        511.96875  0.00868055555555556 0                 Wheelspeed Left Driven              Wheelspeed Left Driven
35   3   3   kph   7     500000   0           16383       0        511.96875  0.00868055555555556 0                 Wheelspeed Right Driven             Wheelspeed Right Driven
36   3   3   kph   7     500000   0           16383       0        511.96875  0.00868055555555556 0                 Wheelspeed Left Non-Driven          Wheelspeed Left Non-Driven
37   3   3   kph   7     500000   0           16383       0        511.96875  0.00868055555555556 0                 Wheelspeed Right Non-Driven         Wheelspeed Right Non-Driven
38   1   5   mm    7     250000   0           65535       -256     255        0.001               -0.256            Suspension Displacement Left Front  Suspension Displacement Left Front
39   1   5   mm    7     250000   0           65535       -256     255        0.001               -0.256            Suspension Displacement Right Front Suspension Displacement Right Front
40   1   5   mm    7     250000   0           65535       -256     255        0.001               -0.256            Suspension Displacement Left Rear   Suspension Displacement Left Rear
41   1   5   mm    7     250000   0           65535       -256     255        0.001               -0.256            Suspension Displacement Right Rear  Suspension Displacement Right Rear
42   8   3   °/sec 7     200000   0           65535       -128     127.9375   0.00109083078249646 -2.23402144255274 Yaw Rate                            Yaw Rate
43   4   1   °C    7     2500000  0           255         -40      87.5       0.5                 233.15            Outside Air Temperature             Outside Air Temperature
44   4   1   °C    7     5000000  0           255         -40      215        1                   233.15            Intake Air Temperature              Intake Air Temperature

mrlv data:

Time Stamp                      : 12:05:06
Date Stamp                      : 2024:03:30
Date Time                       : 2024:03:30 08:04:39-04:00
Time Stamp 2                    : 12:04:39
Date Stamp 2                    : 2024:03:30
Time Zone                       : UNK
Software Version                : 84377136AC 0.1
Language                        : en-US
Units                           : U.S. Imperial

- 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

Wow.  OK. Complication.  There are GPS latitude values at regular intervals for a total of 1844 points in this video, but there is only 1 GPS longitude value.  :(  I hope I'm missing something.

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

sidepipe

Firstly sorry that example file I sent was so big ( it happened to match with the other dashcam footage but maybe I need to go out specifically and record a much shorter sample? )

Anyway, I've had a quick look at that patent and the key seems to be that compact readings use channel numbers which are offset from the previous reading rather than absolute, which presumably means that all such compact readings ( after a full reading ) need to be decoded in order to find all info ( sorry, thinking out loud, I guess everyone already realises this! ) The problem for me is I'm starting from zero - with exiftool as well as this PDR, so the amount of time it would take me to even get at the extracted data to look at would be massive!

If someone could let me know the exact exiftool parameters that would get me the mrl(h|v|d) blocks in binary form from the file then I can have a look myself to see if I can make any sense of it. I can see ( in a -ee3 -U -G3:1 output: )

[Track3]        0x0004 Other Format                    : marl
[Track3]             - Unknown mrlh                    : (Binary data 4 bytes, use -b option to extract)
[Track3]             - Unknown mrlv                    : (Binary data 1716 bytes, use -b option to extract)
[Track3]             - Unknown mrld                    : (Binary data 29568 bytes, use -b option to extract)

but I don't have a clue what ( besides "-b" ) I need to use to get at these specific blocks.

The good news is that the patents do seem to contain the info required to decode these things....

Phil Harvey

We've been communicating by email, but for anyone else reading the other blocks may be extracted like this:

exiftool -u -unknown_mrld -b FILE > mrld.dat

We're making progress (well, sidepipe has made a real breakthrough anyway), and will post back here if/when we have a solution.

- 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

#27
We've managed to decode everything.  It is very impressive the amount of information stored in PDR data.

ExifTool 12.82 will have the ability to extract all this.

Here is an example of the output:

> exiftool test.mp4 gm:all -ee -G0:3
[GM:Main]       Version                         : 3.1
[GM:Main]       Time 1                          : 18:41:11
[GM:Main]       Date 1                          : 2020:06:27
[GM:Main]       Start Time                      : 2020:06:27 18:41:11.236000
[GM:Main]       Time 2                          : 18:41:11
[GM:Main]       Date 2                          : 2020:06:27
[GM:Main]       Time Zone                       : UNK
[GM:Main]       Software Version                : 23258874AQ 0.1
[GM:Main]       Language                        : en-US
[GM:Main]       Units                           : U.S. Imperial
[GM:Main]       Channel 01 Type                 : 0
[GM:Main]       Channel 01 Num                  : 0
[GM:Main]       Channel 01 Units                :
[GM:Main]       Channel 01 Flags                : 1
[GM:Main]       Channel 01 Interval             : 50000000
[GM:Main]       Channel 01 Min                  : 0
[GM:Main]       Channel 01 Max                  : 3
[GM:Main]       Channel 01 Disp Min             : 0
[GM:Main]       Channel 01 Disp Max             : 3
[GM:Main]       Channel 01 Multiplier           : 1
[GM:Main]       Channel 01 Offset               : 0
[GM:Main]       Channel 01 Name                 : System Power Mode
[GM:Main]       Channel 01 Description          : System Power Mode
[GM:Main]       Channel 02 Type                 : 0
[GM:Main]       Channel 02 Num                  : 0
[GM:Main]       Channel 02 Units                :
[GM:Main]       Channel 02 Flags                : 1
[GM:Main]       Channel 02 Interval             : 50000000
[GM:Main]       Channel 02 Min                  : 0
[GM:Main]       Channel 02 Max                  : 1
[GM:Main]       Channel 02 Disp Min             : 0
[GM:Main]       Channel 02 Disp Max             : 1
[GM:Main]       Channel 02 Multiplier           : 1
[GM:Main]       Channel 02 Offset               : 0
[GM:Main]       Channel 02 Name                 : System Backup Power Enabled
[GM:Main]       Channel 02 Description          : System Backup Power Enabled
    <remaining channel parameters except Name omitted for brevity>
[GM:Main]       Channel 03 Name                 : System Backup Power Mode
[GM:Main]       Channel 04 Name                 : Steering 1 Switch
[GM:Main]       Channel 05 Name                 : Steering 2 Switch
[GM:Main]       Channel 06 Name                 : Transport Storage Mode
[GM:Main]       Channel 07 Name                 : Infotain Op Mode
[GM:Main]       Channel 08 Name                 : Valet Mode
[GM:Main]       Channel 09 Name                 : Boost Pressure Ind
[GM:Main]       Channel 10 Name                 : Coolant Temp
[GM:Main]       Channel 11 Name                 : Intake Boost Pressure
[GM:Main]       Channel 12 Name                 : Oil Pressure
[GM:Main]       Channel 13 Name                 : Oil Temp
[GM:Main]       Channel 14 Name                 : RPM
[GM:Main]       Channel 15 Name                 : Accel Pos
[GM:Main]       Channel 16 Name                 : Clutch Pos
[GM:Main]       Channel 17 Name                 : Brake Pos
[GM:Main]       Channel 18 Name                 : LF Tyre Pressure
[GM:Main]       Channel 20 Name                 : RF Tyre Pressure
[GM:Main]       Channel 19 Name                 : LR Tyre Pressure
[GM:Main]       Channel 21 Name                 : RR Tyre Pressure
[GM:Main]       Channel 22 Name                 : LF Tyre Temp
[GM:Main]       Channel 24 Name                 : RF Tyre Temp
[GM:Main]       Channel 23 Name                 : LR Tyre Temp
[GM:Main]       Channel 25 Name                 : RR Tyre Temp
[GM:Main]       Channel 26 Name                 : Gear
[GM:Main]       Channel 27 Name                 : Trans Oil Temp
[GM:Main]       Channel 28 Name                 : Fuel Level
[GM:Main]       Channel 29 Name                 : Fuel Capacity
[GM:Main]       Channel 30 Name                 : Steering Angle
[GM:Main]       Channel 31 Name                 : Distance
[GM:Main]       Channel 32 Name                 : Speed
[GM:Main]       Channel 33 Name                 : ABS Active
[GM:Main]       Channel 34 Name                 : Traction Control Active
[GM:Main]       Channel 35 Name                 : Vehicle Stability Active
[GM:Main]       Channel 36 Name                 : Corner Exit Setting
[GM:Main]       Channel 37 Name                 : Speed Request Intervention
[GM:Main]       Channel 38 Name                 : Speed Control Response
[GM:Main]       Channel 39 Name                 : Engine Speed Request
[GM:Main]       Channel 40 Name                 : Engine Torqure Req
[GM:Main]       Channel 41 Name                 : Battery Voltage
[GM:Main]       Channel 42 Name                 : Lateral Acceleration
[GM:Main]       Channel 43 Name                 : Longitudinal Acceleration
[GM:Main]       Channel 44 Name                 : Vertical Acceleration
[GM:Main]       Channel 45 Name                 : Latitude
[GM:Main]       Channel 46 Name                 : Longitude
[GM:Main]       Channel 47 Name                 : Altitude
[GM:Main]       Channel 48 Name                 : Heading
[GM:Main]       Channel 49 Name                 : GPS Fix
[GM:Main]       Channel 50 Name                 : Beacon
[GM:Doc2]       Time Stamp                      : 2020:06:27 18:41:11.239285
[GM:Doc2]       Accel Pos                       : 17.25 %
[GM:Doc2]       Intake Boost Pressure           : -40.00 kPa
[GM:Doc2]       RPM                             : 2351.74 rpm
[GM:Doc3]       Time Stamp                      : 2020:06:27 18:41:11.251286
[GM:Doc3]       Brake Pos                       : 1.96 %
[GM:Doc4]       Time Stamp                      : 2020:06:27 18:41:11.252285
[GM:Doc4]       Accel Pos                       : 17.25 %
[GM:Doc4]       Intake Boost Pressure           : -40.00 kPa
[GM:Doc4]       RPM                             : 2350.43 rpm
[GM:Doc5]       Time Stamp                      : 2020:06:27 18:41:11.261286
[GM:Doc5]       Brake Pos                       : 1.18 %
[GM:Doc6]       Time Stamp                      : 2020:06:27 18:41:11.265285
[GM:Doc6]       Accel Pos                       : 17.25 %
[GM:Doc6]       Intake Boost Pressure           : -40.00 kPa
[GM:Doc6]       RPM                             : 2352.27 rpm
[GM:Doc7]       Time Stamp                      : 2020:06:27 18:41:11.272285
[GM:Doc7]       Speed                           : 58.31 km/h
[GM:Doc8]       Time Stamp                      : 2020:06:27 18:41:11.273286
[GM:Doc8]       Oil Pressure                    : 284.00 kPa
[GM:Doc8]       Oil Temp                        : 59 C
[GM:Doc8]       Fuel Level                      : 82.75 %
[GM:Doc8]       Fuel Capacity                   : 69.625 L
[GM:Doc9]       Time Stamp                      : 2020:06:27 18:41:11.277286
[GM:Doc9]       Accel Pos                       : 17.25 %
[GM:Doc9]       Intake Boost Pressure           : -40.00 kPa
[GM:Doc9]       RPM                             : 2349.39 rpm
[GM:Doc10]      Time Stamp                      : 2020:06:27 18:41:11.290286
[GM:Doc10]      Accel Pos                       : 17.25 %
[GM:Doc10]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc10]      RPM                             : 2350.43 rpm
[GM:Doc11]      Time Stamp                      : 2020:06:27 18:41:11.302286
[GM:Doc11]      Accel Pos                       : 17.25 %
[GM:Doc11]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc11]      RPM                             : 2351.74 rpm
[GM:Doc12]      Time Stamp                      : 2020:06:27 18:41:11.314286
[GM:Doc12]      Accel Pos                       : 17.25 %
[GM:Doc12]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc12]      RPM                             : 2349.65 rpm
[GM:Doc13]      Time Stamp                      : 2020:06:27 18:41:11.327286
[GM:Doc13]      Accel Pos                       : 17.25 %
[GM:Doc13]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc13]      RPM                             : 2350.70 rpm
[GM:Doc14]      Time Stamp                      : 2020:06:27 18:41:11.334456
[GM:Doc14]      Latitude                        : 34.681183 N
[GM:Doc14]      Longitude                       : 82.820822 W
[GM:Doc14]      Altitude                        : 254.1 m
[GM:Doc14]      Heading                         : 236.46
[GM:Doc14]      GPS Fix                         : 1
[GM:Doc15]      Time Stamp                      : 2020:06:27 18:41:11.339286
[GM:Doc15]      Accel Pos                       : 17.25 %
[GM:Doc15]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc15]      RPM                             : 2349.91 rpm
[GM:Doc16]      Time Stamp                      : 2020:06:27 18:41:11.351285
[GM:Doc16]      Brake Pos                       : 1.96 %
[GM:Doc17]      Time Stamp                      : 2020:06:27 18:41:11.352286
[GM:Doc17]      Accel Pos                       : 17.25 %
[GM:Doc17]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc17]      RPM                             : 2352.27 rpm
[GM:Doc18]      Time Stamp                      : 2020:06:27 18:41:11.361285
[GM:Doc18]      Brake Pos                       : 1.18 %
[GM:Doc19]      Time Stamp                      : 2020:06:27 18:41:11.364285
[GM:Doc19]      Accel Pos                       : 17.25 %
[GM:Doc19]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc19]      RPM                             : 2350.17 rpm
[GM:Doc20]      Time Stamp                      : 2020:06:27 18:41:11.371286
[GM:Doc20]      Speed                           : 58.38 km/h
[GM:Doc21]      Time Stamp                      : 2020:06:27 18:41:11.377285
[GM:Doc21]      Accel Pos                       : 17.25 %
[GM:Doc21]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc21]      RPM                             : 2356.72 rpm
[GM:Doc22]      Time Stamp                      : 2020:06:27 18:41:11.390285
[GM:Doc22]      Accel Pos                       : 17.25 %
[GM:Doc22]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc22]      RPM                             : 2355.67 rpm
[GM:Doc23]      Time Stamp                      : 2020:06:27 18:41:11.401286
[GM:Doc23]      Brake Pos                       : 1.96 %
[GM:Doc24]      Time Stamp                      : 2020:06:27 18:41:11.411286
[GM:Doc24]      Brake Pos                       : 1.18 %
[GM:Doc25]      Time Stamp                      : 2020:06:27 18:41:11.412039
[GM:Doc25]      Lateral Acceleration            : 0.000 G
[GM:Doc26]      Time Stamp                      : 2020:06:27 18:41:11.413183
[GM:Doc26]      Longitudinal Acceleration       : 0.000 G
[GM:Doc27]      Time Stamp                      : 2020:06:27 18:41:11.413278
[GM:Doc27]      Vertical Acceleration           : 0.941 G
[GM:Doc28]      Time Stamp                      : 2020:06:27 18:41:11.415286
[GM:Doc28]      Accel Pos                       : 17.25 %
[GM:Doc28]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc28]      RPM                             : 2353.58 rpm
[GM:Doc29]      Time Stamp                      : 2020:06:27 18:41:11.427286
[GM:Doc29]      Accel Pos                       : 17.25 %
[GM:Doc29]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc29]      RPM                             : 2356.46 rpm
[GM:Doc30]      Time Stamp                      : 2020:06:27 18:41:11.439286
[GM:Doc30]      Accel Pos                       : 17.25 %
[GM:Doc30]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc30]      RPM                             : 2355.93 rpm
[GM:Doc31]      Time Stamp                      : 2020:06:27 18:41:11.451286
[GM:Doc31]      Brake Pos                       : 1.96 %
[GM:Doc32]      Time Stamp                      : 2020:06:27 18:41:11.452286
[GM:Doc32]      Accel Pos                       : 17.25 %
[GM:Doc32]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc32]      RPM                             : 2357.77 rpm
[GM:Doc33]      Time Stamp                      : 2020:06:27 18:41:11.461286
[GM:Doc33]      Brake Pos                       : 1.18 %
[GM:Doc34]      Time Stamp                      : 2020:06:27 18:41:11.465286
[GM:Doc34]      Accel Pos                       : 17.25 %
[GM:Doc34]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc34]      RPM                             : 2355.93 rpm
[GM:Doc35]      Time Stamp                      : 2020:06:27 18:41:11.468286
[GM:Doc35]      Engine Torqure Req              : 63.5 Nm
[GM:Doc36]      Time Stamp                      : 2020:06:27 18:41:11.472286
[GM:Doc36]      Speed                           : 58.48 km/h
[GM:Doc37]      Time Stamp                      : 2020:06:27 18:41:11.477286
[GM:Doc37]      Accel Pos                       : 17.25 %
[GM:Doc37]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc37]      RPM                             : 2356.98 rpm
[GM:Doc38]      Time Stamp                      : 2020:06:27 18:41:11.490286
[GM:Doc38]      Accel Pos                       : 17.25 %
[GM:Doc38]      Intake Boost Pressure           : -40.00 kPa
[GM:Doc38]      RPM                             : 2359.60 rpm
[GM:Doc39]      Time Stamp                      : 2020:06:27 18:41:11.492285
[GM:Doc39]      Engine Torqure Req              : 63 Nm
[GM:Doc40]      Time Stamp                      : 2020:06:27 18:41:11.501286
[GM:Doc40]      Brake Pos                       : 1.96 %
...

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

sidepipe

I think Phil uses the word "we" far too generously - I'd like to think I helped a bit, but really he did all the hard work, and again I want to thank him for this and for exiftool generally.

As for the PDR itself, as Phil says it's really incredible how much data you get considering it's fitted to GM cars - probably similar to the info race teams have to hand.

Phil Harvey

#29
Thanks Sidepipe.

Attached is a format file from Sidepipe that may be useful for others who want to create a CSV file for importing into RaceRender. --> (see Edit2 below)

exiftool -ee -n -m -p pdrcsv.fmt FILE > out.csv

And please let me know if anyone has a Corvette C8 PDR video to share -- I would like to test the code against this new version of PDR.

- Phil

Edit: Note that processing large PDR videos may be slow and require a lot of memory.  On my system, extracting all of the information from a 680 MB video produces 920,000 tags, takes 78 seconds (or 10x longer using Sidepipe's format file), and requires 1 GB of RAM.  However, there are ways to speed things up and reduce the memory requirements if you don't need to extract all of the information (eg. the API IgnoreTags option).

Edit2: I've added an optimized API PrintCSV option that prints all PDR data in CSV format directly.  With this option, the processing time drops to 6.4 seconds, and memory usage to 37 MB for the above-mentioned 680 MB video.  Also, the corresponding command is much simpler:

exiftool -api printcsv FILE > out.csv
...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 ($).