ExifTool Forum

ExifTool => Newbies => Topic started by: lep on November 09, 2021, 12:53:58 PM

Title: Timecode (seconds from start) from gpsdatetime
Post by: lep on November 09, 2021, 12:53:58 PM
Hi, this is my first approach with exiftool but I've reached my goal rapidly. The only thing that I wasn't able to do is to transform the absolute "gpsdatetime" in a relative "timecode" (starting from 0 seconds). Can be done without postprocessing the GPX file? I'm using a custom version of gpx.fmt
Thanks in advance
Best regards and thankf for your great job
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: Phil Harvey on November 09, 2021, 02:08:23 PM
You could do something like this:

exiftool -d %s -p "${gpsdatetime;$_-=STARTTIMECODE}" FILE

where STARTTIMECODE is the number of seconds at your time zero.

- Phil
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: lep on November 11, 2021, 05:00:47 AM
Thank you very much for your suggestion!!
Just another question. Only when I use gpx.fmt, I've the following warnings:

Warning: Truncated '\x00\x02\x00\x00' data - C:/Users/fserp/Documents/QT/exiftool_gui/work/VID_20210611_090252_00_024.insv
Warning: [Minor] Insta360 accelerometer data is huge. Processing only the first 20000 records - C:/..../4.insv

I can avoid the second warning using -m switch (anyway I'm not interested in accelerometer data) but I can't understand the first warning. Can it be dangerous?

Thanks in advance
Best regards
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: Phil Harvey on November 11, 2021, 07:10:53 AM
You can safely ignore these warnings if you are just reading metadata from the files.  You should also get these warnings when you aren't using gpx.fmt.

The first warning is likely some non-standard trailer added to the file.

The accelerometer warning is to prevent excessive memory use.  If you add -m all of the accelerometer data will be read into memory which may slow things down a lot.  You can add -q -q to just ignore these warnings.

- Phil
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: lep on November 12, 2021, 02:56:16 AM
Thank you again for your precious help.
Have a nice day
L
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: tranzitnotes on February 11, 2022, 12:44:51 AM
"C:\Users\tranz\Videos\0\exiftool-12.40\exiftool.exe" -p "C:\Users\tranz\Videos\0\exiftool-12.40\gpx.fmt" -ee -api largefilesupport "C:\Users\tranz\Videos\0\exiftool-12.40\VID_20201111_211453_00_023.insv" > "C:\Users\tranz\Videos\0\exiftool-12.40\VID_20201111_211453_00_023.gpx"

pls help me where to add the following in my above command line

The accelerometer warning is to prevent excessive memory use.  If you add -m all of the accelerometer data will be read into memory which may slow things down a lot.  You can add -q -q to just ignore these warnings.

thanks in advance
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: Phil Harvey on February 11, 2022, 07:10:17 AM
You can put additional options anywhere before the > on the command line except between another option and its argument. (ie. not between -api and largefilesupport or between -p and "C:\Users\tranz\Videos\0\exiftool-12.40\gpx.fmt").

- Phil
Title: Re: Timecode (seconds from start) from gpsdatetime
Post by: tranzitnotes on February 11, 2022, 05:34:50 PM
thanks for your prompt help reply which increase my interest in metadata understanding  :)