Hello,
I was wondering if it is possible to export multiple .gpx files from multiple folders in one go?
I have over 100 folders with different image sets and it is unimaginable to run the process one by one.
Thanks,
Erekle
Hi Erekle,
ExifTool can almost do what you want with this command:
exiftool -p test.fmt -W+ %dout.gpx -r DIR
and this "test.fmt" file:
#[SECT]<?xml version="1.0" encoding="utf-8"?>
#[SECT]<gpx version="1.0"
#[SECT] creator="ExifTool $ExifToolVersion"
#[SECT] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[SECT] xmlns="http://www.topografix.com/GPX/1/0"
#[SECT] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[SECT]<trk>
#[SECT]<number>1</number>
#[SECT]<trkseg>
#[IF] $gpslatitude $gpslongitude
#[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
#[BODY] <ele>$gpsaltitude#</ele>
#[BODY] <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%SZ")}</time>
#[BODY]</trkpt>
The only problem is that the output GPX files won't be properly terminated, and you'll have to manually add these lines to each one to make a valid GPX file:
</trkseg>
</trk>
</gpx>
I haven't figured out how to do this automatically with ExifTool.
- Phil
Thank you, Phil!
Hi Phil,
Have just tried this and can't get it working. I'm also looking to extract GPX from .mp4 if that makes a difference... And doesn't make a difference using the test.fmt or gpx.fmt either.
Also found another option on another forum which gives the same output
exiftool -p gpx.fmt -ee -w %d%f.gpx video directory
The output i get is
1 directories scanned
0 image files read
0 output files created
All mp4 files are in video directory and happy with a single file for every movie.
Any help would be super awesome. Thanks.
Are the files in that directory or in subdirectories? The output of your command indicates that there are no files in the directory. If they are in subdirectories, then add -r (-recurse) option (https://exiftool.org/exiftool_pod.html#r-.--recurse).
Hi StarGeek,
Amazing what a good sleep can do, it was the extra \ on the directory. :-[
Have just realised that the output from each mp4 seems to be duplicated within each gpx file? I.e each file has the same 60 seconds of data listed twice.
Link to GPX exported from one mp4 file (https://1drv.ms/u/s!Aq8suWK5oKFCh6MnU-5RUXJkPRglEQ?e=yTWHNF)
Any help would be appreciated.
Can you provide a link to an MP4 that shows this effect?
- Phil