Recursively sort movies into folders by duration (seconds/ms)

Started by clem, June 01, 2018, 02:48:55 AM

Previous topic - Next topic

clem

I have a set of folders sorted into YYYY-MM-DD order all containing MP4 and MOV files. Usually having AV files sorted into chronological order is helpful for organizing, except in this case I would like to sort the video files into folders by duration in order to eliminate duplicates. No other method seems practicable since many files have been stripped of all metadata and are likely also recompressed into smaller versions from their original files — a large number of files now seem to be originally digitized in 1904/01/01. Are there suggestions how I could do this?

thanks!

Phil Harvey

Sorting into folders seems a bit extreme, but it could be done like this:

exiftool "-directory<duration#" -r DIR

What about just listing the durations and finding the duplicates manually?:

exiftool -duration# -filename DIR | sort

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

clem

Super, that worked great. Yes, it's a bit of work to sort through, but the results are just what I was looking for re: folder creation as a way of isolating duplicates.

thanks!