Home > other >  How to get information with Track like Xml in json using exiftool
How to get information with Track like Xml in json using exiftool

Time:09-16

I am trying to get metadata of a video using exiftool but data coming from exiftool is different for both xml and json

using this command:

exiftool -ee -G3 -api LargeFileSupport=1 -X filename.mp4

i get output like this for xml:

<Track1:GPSDateTime>2020:19:24 03:12:05.456</Track1:GPSDateTime>

But for json

exiftool -ee -G3 -api LargeFileSupport=1 -j filename.mp4

i am getting:

[{
  "SourceFile": "filename.mp4",
  "Doc1:GPSDateTime": "2020:19:24 03:12:05.456",
}]

How can i get Tracks in json too?

CodePudding user response:

I do not believe you can get it exactly like you want. From the -j (-json) option

…entries with identical JSON names are suppressed…

You can use multiple group numbers to get unique output, i.e. if you use -G1:3, you will get Track1:Doc1:GPSDateTime, Track1:Doc2:GPSDateTime, etc.

  • Related