GoPro GPMF -b option no spacing

Started by JobWellDone, May 31, 2025, 04:44:37 AM

Previous topic - Next topic

JobWellDone

When i run
exiftool -ee "T:\-= GoPro Max =-\GS010596.360" > "T:\-= GoPro Max =-\GS010596_GPMF.txt" it shows

QuoteGyroscope: (Binary data 44260 bytes, use -b option to extract)

and when i add -b option
exiftool -ee -b "T:\-= GoPro Max =-\GS010596.360" > "T:\-= GoPro Max =-\GS010596_GPMF.txt"produced output is not spaced all mixed up together even when i open in hex editor there's no way to see any separateion for the data.


Quote12.85GS010596.360T:/-= GoPro Max =-557208872025:05:27 18:31:22+03:002025:05:31 11:32:02+03:002025:05:27 18:31:14+03:00100666MP4MP4video/mp4mp412013.10.18mp41556752462802025:05:27 18:31:142025:05:27 18:31:14900006.7067111 0 0 0 1 0 0 0 1000000659.413 27.5993H19.03.02.02.00                                  Settings8 1 2H19.03.02.02.00C3351325003687GoPro Max1828950940 2883544823 2751280509 422239096 0 0 0 0UNYNATIVELOWFLATAUTO32001000.02_1SEC20.6007671356201N/AAUTOGeometry CalibrationsBack LensFront LensHighlights02025:05:27 18:31:142025:05:27 18:31:1416.7067001 0 0 0 1 0 0 0 140961344302025:05:27 18:31:142025:05:27 18:31:14900006.7067mhlrvideGoPro H.26500 0 0hvc1409613447272GoPro H.265 encoder2429.9700299700302025:05:27 18:31:142025:05:27 18:31:1426.6773333333333300.3906251 0 0 0 1 0 0 0 1302025:05:27 18:31:142025:05:27 18:31:14480006.67733333333333mhlrsounGoPro AAC  0mp4a2244800002025:05:27 18:31:142025:05:27 18:31:1436.7067001 0 0 0 1 0 0 0 140961602025:05:27 18:31:142025:05:27 18:31:14900006.7067mhlrtmcdGoPro TCD  00 0 06432768 32768 327680210100 0 065535 65535 65535Helveticatmcd29.9700299702025:05:27 18:31:142025:05:27 18:31:1446.706001 0 0 0 1 0 0 0 102025:05:27 18:31:142025:05:27 18:31:1410006.706mhlrmetaGoPro MET  00 0 000 0 00gpmd01.001GoPro Max0.1858910 -1 0 1 0 0 0 0 1XzYZXY40.91015625-3.78896882494005 -12.9064748201439 -1.28776978417266 -3.8968824940048 -12.947242206235 -0.810551558752998 -4.10071942446043 -12.9040767386091 -0.258992805755396 -4.29256594724221 -12.6067146282974 0.297362110311751 -4.38369304556355 -11.9328537170264 0.750599520383693 -4.60911270983213 -11.3093525179856 1.18705035971223 -4.75779376498801 -10.5083932853717 1.6810551558753 -4.92565947242206 -9.80335731414868 2.16546762589928 -5.0863309352518 -9.19904076738609

greybeard

What exactly are you hoping to get? This might give you a lot of data.

You can use the separator option in addition to the -b (for example -sep "\n" -sep "\n" to add returns or new lines)

-b, --b (-binary, --binary)
Output requested metadata in binary format without tag names or descriptions (-b or -binary). This option is mainly used for extracting embedded images or other binary data, but it may also be useful for some text strings since control characters (such as newlines) are not replaced by '.' as they are in the default output. By default, list items are separated by a newline when extracted with the -b option, but this may be changed (see the -sep option for details).

-sep STR (-separator)
For pure binary output (-b used without -j, -php or -X), the first -sep option specifies a list-item separator, and a second -sep option specifies a terminator for the end of the list (or after each value if not a list). In these strings, \n, \r and \t may be used to represent a newline, carriage return and tab respectively. By default, binary list items are separated by a newline, and no terminator is added.

JobWellDone

Quote from: greybeard on May 31, 2025, 07:40:43 AMWhat exactly are you hoping to get? This might give you a lot of data.
Gyro data from GPMF stream embedded into video.

Quote from: greybeard on May 31, 2025, 07:40:43 AMYou can use the separator option in addition to the -b (for example -sep "\n" -sep "\n" to add returns or new lines)
-sep "xxx" Does not do anything or there are no new lines.


If i run

exiftool -ee "T:\-= GoPro Max =-\GS010596.360" > "T:\-= GoPro Max =-\GS010596_GPMF.txt"result
Quote[{
  ...
  "Accelerometer": "(Binary data 10731 bytes, use -b option to extract)",
  "Gyroscope": "(Binary data 45724 bytes, use -b option to extract)",
  "WhiteBalanceRGB": "(Binary data 239 bytes, use -b option to extract)",
  "CameraOrientation": "(Binary data 2296 bytes, use -b option to extract)",
  "ImageOrientation": "(Binary data 239 bytes, use -b option to extract)",
  "GravityVector": "(Binary data 1653 bytes, use -b option to extract)",
  ...
}]

Can i apply -b only to this sub entries e.g. WhiteBalanceRGB?

Right now is -b used it throws all data in one big chunk without separation and no way of telling which one belongs where.

greybeard

lets says you want to get all the WhiteBalanceRGB data from the file you could do the following:

exiftool -WhiteBalanceRGB -ee -b -sep "\n" -sep "\n" gopro1.MP4 > gopro1_wb.txt

and you should get a single file with each set of white balance values per line

(Note that this was tested on a Mac - there are sometimes differences with Windows such as switching single and double quotes)

StarGeek

Can you provide a sample file? It's hard to provide a quick solution without actually being able to check the file. It might also be possible to add support for this data.
"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

JobWellDone

Quote from: greybeard on May 31, 2025, 10:57:32 AMexiftool -WhiteBalanceRGB -ee -b -sep "\n" -sep "\n" gopro1.MP4 > gopro1_wb.txt
Nice this worked, why there's a need to specify -sep twice, if used one time it did not work.

Quote from: StarGeek on May 31, 2025, 11:05:14 AMCan you provide a sample file? It's hard to provide a quick solution without actually being able to check the file. It might also be possible to add support for this data.
Uploaded here, click download on the left size panel.

Phil Harvey

The first -sep option specifies the separator for items in List-type tags, and the second specifies a terminator after each tag value.  This is explained in the -sep option documentation but I'll also add it to the -b section.

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