News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

ExifTool - how to speedup lookups in video files

Started by redtux, June 08, 2020, 09:09:03 AM

Previous topic - Next topic

redtux

Hi
Are there any ways to speed up how long it takes to process reading loads of meia files.
With a base number of around 30000 files Image::Exiftool takes around 35 minutes.

I have tried using Parrallel, but it runs sequentially due to waiting for IO (all processes spawned bar 1 have status of D+, ie: uninterruptable sleep probably io from man page of ps)
code

DB lookup for list of files

my $list=$dbh->selectall_arrayref('SELECT DISTINCT tagfile
FROM tagfile ');

use Image::ExifTool;
my $exifTool = new Image::ExifTool;
my @tags=(qw/Artist Title TVShow Album Genre Year ImageWidth AvgBitrate AverageBitRate FileType FileSize Filename/); # this takessame time as no tags defined
$exifTool->Options(FastScan => 2);

foreach my $l (@{$list}){
my $tagsr=$exifTool->ImageInfo($l,@tags);
}


Any tips appreciated

Mike

Phil Harvey

Hi Mike,

Yes, the ExifTool API is not designed for parallel processing.  The only option I could see would be to spawn multiple Perl processes.

- 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 ($).