ExifTool Forum

General => Metadata => Topic started by: faketoe on March 18, 2016, 11:01:18 PM

Title: Different video duration formats
Post by: faketoe on March 18, 2016, 11:01:18 PM
Hi,

when I use exiftool to get video duration of two file, I get different duration formats,

"Duration": "14.33 s"
"Duration": "0:01:00"

How can I parse / handle this different formats ? Is it just these two types or exiftool may report other duration formats depending on the video ?

ps. I also added full output into gist, https://gist.github.com/ubaltaci/6c96053b4feef66b7710

Title: Re: Different video duration formats
Post by: Phil Harvey on March 21, 2016, 07:04:29 AM
The format is intended to be human readable, and depends on the length of the video.  Use the -n option to get a consistent machine-readable format.

- Phil
Title: Re: Different video duration formats
Post by: djebox on April 01, 2016, 01:16:35 PM
Hi,

but how can we do if we don't want to use '-n' option...
It exists --coordFormat option to format GPS coord, does it exist something like this for duration ? --durationFormat ?

Thanks
FDJ
Title: Re: Different video duration formats
Post by: Phil Harvey on April 01, 2016, 01:19:26 PM
There is no option to change the human-readable format for Duration.

The only options are to use either -n or -duration# to avoid the conversion.

- Phil