generating unique tag names when same tag name occurs more than once?

Started by Martin314, February 19, 2020, 04:02:05 PM

Previous topic - Next topic

Martin314

I have noticed that if I extract GPS information (e.g. using -ee), I get the same tag multiple times.  This is problematic when I use a package such as node-exiftool which parses exiftool output into a javascript object, because it only retains a single instance of each tag.  Is there a way to force exiftool to output something like an index to make each tag unique?  So for instance, instead of outputting GPSDateTime several times, it would output GPSDateTime1, GPSDateTime2, etc?

StarGeek

From the docs on the -ee (extractEmbedded) option
    Use -g3 or -G3 to identify the originating document for extracted information.

Here's some example output from a mov file I picked up here at some point
[Doc1]          GPSDateTime                     : 2017:12:31 16:45:20Z
[Doc1]          GPSLatitude                     : 54 deg 27' 17.72" N
[Doc1]          GPSLongitude                    : 18 deg 32' 57.50" E
[Doc1]          GPSSpeed                        : 13.9085
[Doc1]          GPSSpeedRef                     : km/h
[Doc1]          GPSTrack                        : 330.74
[Doc1]          GPSTrackRef                     : True North
[Doc2]          GPSDateTime                     : 2017:12:31 16:45:21Z
[Doc2]          GPSLatitude                     : 54 deg 27' 17.81" N
[Doc2]          GPSLongitude                    : 18 deg 32' 57.36" E
[Doc2]          GPSSpeed                        : 12.0936
[Doc2]          GPSSpeedRef                     : km/h
[Doc2]          GPSTrack                        : 295.56
[Doc2]          GPSTrackRef                     : True North
[Doc3]          GPSDateTime                     : 2017:12:31 16:45:22Z
[Doc3]          GPSLatitude                     : 54 deg 27' 17.87" N
[Doc3]          GPSLongitude                    : 18 deg 32' 57.15" E
[Doc3]          GPSSpeed                        : 13.7789
[Doc3]          GPSSpeedRef                     : km/h
[Doc3]          GPSTrack                        : 284.9
[Doc3]          GPSTrackRef                     : True North
[Doc4]          GPSDateTime                     : 2017:12:31 16:45:23Z
[Doc4]          GPSLatitude                     : 54 deg 27' 17.87" N
[Doc4]          GPSLongitude                    : 18 deg 32' 56.93" E
[Doc4]          GPSSpeed                        : 13.8159
[Doc4]          GPSSpeedRef                     : km/h
[Doc4]          GPSTrack                        : 271.85
[Doc4]          GPSTrackRef                     : True North
"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

Martin314

Unfortunately, -G3 (or -g3) doesn't seem to fix the issue, as node-exiftool seems to ignore the originating document.  I guess for right now I'll just spawn exiftool directly as a workaround.