I noticed something strange whilst getting familiar with ExifTool Custom Columns. There are some MP4 video clips in my Downloads folder so I thought I would test with a QuickTime-Duration column. The result appears as time of day rather than duration. I actually had two open Downloads tabs so I tried the same thing in the second tab and once again time of day is displayed rather than duration. Adding to the strangeness is the fact that the time of day displayed is different between the first and second Downloads tabs. I then created a 3rd instance of Downloads by duplicating one of the other two. This last instance correctly shows duration. The same is true for a new Downloads tab created from Favorites.
In an attempt to simplify for this report I isolated a single MP4 file and took screenshots of the three results including corresponding folder formats. First I deliberately reset the first tab to !folder which as can be seen made no difference. I also tried adding the column in different places; once again made no difference.
This is most likely a one-off and unless there is an obvious answer which escapes me (as is often the case) I don't expect the developers to spend time on this. Windows 10 Pro, DOpus 12.30.3 beta.
Script columns don't currently have a "duration" type - that column's type is set to "time" which is intended to show time of day. The bug is actually that you get a duration at times! I'm not sure why this would be happening.
The easiest solution would be to change the column type to show a normal string and format the duration string in the script.
I thought exactly the same thing when I first noticed this oddity so I modified the exifColumns definition in ColumnExifTool.js as shown below and that's what was used for the examples above.
var exifColumns = [
new DefineColumn('QuickTime', 'Duration', '', '', '', '', '', ''),
new DefineColumn('QuickTime', 'MediaDuration', '', '', '', '', '', '')
];
The script is giving Opus the value as a Date; that will auto-format as a date when asked to convert to string form. You'd need to change it to provide the value as a string (and format the string as hh:mm:ss or whatever yourself).
if (value != '') {
if (column.type == 'datetime' || column.type == 'date' || column.type == 'time') {
value = DOpus.Create().Date(value.replace(/:/g, ''));
} else if (column.type == 'number') {
value = Number(value);
} else if (column.type == 'duration') {
// add code here for new "duration" type
}
}
The Duration column in the first screen grab was generated by the 2021-07-17 version of ColumnExifTool using the definition immediately above the grab which explicitly specified the column header as Duration. I didn't bother changing the default header definition in the 2023-02-28 version.
At the risk of complicating matters further I tried doing the same thing on three systems - desktop, laptop and vm. All three are running W10 Pro (up to date) and DOpus v12.31. Results were different on all three as shown below. I will PM you a couple of the mp4 files that display -nan(ind) on at least one of the systems.