Round up Duration to prevent sub one second files from being shown as zero

Started by clpratt, August 04, 2019, 04:48:58 PM

Previous topic - Next topic

clpratt

I was recently interested in post 9207 which gave a solution for suppressing "00:00:00" for the case of suppressing/hiding non audio/video files.
Unfortunately sub 1s video/audio clips are shown as a duration of 00:00:00 by IMatch and so are unintentionally suppressed.
When these short clips are viewed in Windows File Explorer, IrfanView or VLC they are shown a duration of 1 second.
Clearly if they have any duration at all they are not zero.
Please could IMatch round up the Duration value so they are not given a duration of zero..




Mario

How many video or audio clips do you have which are less than one second? And for which purpose?
I'm not sure that this will be an issue for many users...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

clpratt

Not that many, but now that I'm using the "00:00:00" suppression it's a bit disconcerting to see a video/audio file with no result.
I think why. Is there no duration associated with the file, or is it a sub 1s file?
Would be nice to show a duration for all video/audio files.

Mario

IMatch does not make up the value, it uses either metadata tags or the results of the FFMpeg library. I doubt IMatch even gets the sub-second information.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

clpratt

I have 4 sub 1 second AVIs.
All show Composite Duration as 1.00 s in the Metadata panel.
But in each case Attribute Duration (HH:MM:SS) in the file window says 00:00:00 !

Mario

Then FFMpeg returns a duration of 0 when processing the file. Or maybe an error because the file has no frames. Or whatever.
Composite tags are made up by ExifTool from whoknowswhat. I don't use them unless there is no alternative.

Attach a sample video so I can have a look.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

clpratt


clpratt


Mario

This problem happend with sub-second reminders during converting the video duration to HH:MM:SS. I now round the seconds up, which displays 00:00:01 for your video, which is actually only 0.99999 seconds long.
I have no idea what you do with videos which are less than one second long, though.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

clpratt

Thank you very much Mario.  :)
I look forward to the next IMatch update incorporating this change.

sinus

Quote from: Mario on August 05, 2019, 01:04:09 PM
I have no idea what you do with videos which are less than one second long, though.

I do also not know this.
But when we look at films, videos, even long films, cuts are always shorter and shorter and wilder.
No problem to use half a second or even shorter to make a video dramaturgically faster.

Another scenario, not that seldom:
People shot short videos accidentally, because they push the button, and think, they make a photo, but actually they create a short video, because the cam was set on videos.

From relatives I become a LOT of such short videos, mostly under 1 second, because they pushed the button and released again after a short time (the photo was taken for them  ;D).
Now I have two options: create pictures from such videos or cut the snippets to one longer video ... well, a third option, yes, delete all.  8)
Best wishes from Switzerland! :-)
Markus