ExifTool Forum

ExifTool => Newbies => Topic started by: giuli on December 31, 2019, 06:44:17 AM

Title: Save gps data of a video in csv
Post by: giuli on December 31, 2019, 06:44:17 AM
Hi everyone!
I'm new to Exiftool.
I would like to extract the gps information embedded in a mov video.
If I use the command
exiftool -ee -gpslatitude .gpslongitude -gpsdatetime -gpsspeed video.mov > out.csv
the output contains the data for each point, but is not formatted.
Adding the -csv command the output contains only one line with data (the first point), instead of all the points as the output before.
I've tred to add a double ">" in order to avoid the overwriting but the cause was not that one.

What can I do in order to have all the data but formatted? I don't need to have a csv, a json could be ok as well, or other formats.

Thank you for your help!
Title: Re: Save gps data of a video in csv
Post by: Phil Harvey on December 31, 2019, 10:34:54 AM
The -p option is the one to use for this.  For example, you could do this for CSV output format:

exiftool -n -p "$gpslatitude,$gpslongitude,$gpsdatetime,$gpsspeed" FILE

But any format is possible.  See the -p option documentation (https://exiftool.org/exiftool_pod.html#p-FMTFILE-or-STR--printFormat) for details, and the fmt_files (https://github.com/exiftool/exiftool/tree/master/fmt_files) included with the full distribution for examples of GPX and KML output formatting.

- Phil
Title: Re: Save gps data of a video in csv
Post by: giuli on January 02, 2020, 04:25:10 AM
It works fine!
Thank you very much for your help!!
Happy new year!  ;D
Giulia