News:

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

Main Menu

First data of the batch processing of the exiftool is not complete

Started by yyyy, October 09, 2019, 03:58:54 PM

Previous topic - Next topic

yyyy

I am trying to use exifTool to read the psd/psb images by batch processing

OS i: macos mojave 10.14.3
ExifTool : 11.61

I use the QProcess(A class of Qt) to read the standard output of the exiftool

First solution : Read the output of the exiftool after batch process complete.

The results are fine.

Second solution : Read the output of the exiftool whenever the standard output is ready

The first results of the standard output always incomplete(only first image is incomplete).
The QProcess do not output any error messages in this case.

Part of the source codes:

//read the output whenever the standard output is ready
connect(process_.get(), &QProcess::readyReadStandardOutput, this, &read_ps_images::exif_standard_output_ready);

void read_ps_images::exif_standard_output_ready()
{
    //try readAll too, same results
    parse_exif_ready_output(process_->readAllStandardOutput(), img_paths_);
}


A complete data should have 105xx bytes, but the image read by second solution only got 8192 bytes.
I have try to read the first image two times, second times the exifTool can return complete data, is this a right way to solve the problem?Thanks

Edit : The command I use

"/Users/yyyy/Image-ExifTool-11.61/exiftool -stay_open True -@ /private/var/folders/x0/8rbh8zc91_xb_lcykq_6x2vm0000gn/T/{d7f3149f-8e29-4b47-bd37-e0f2775a5593}.txt"

The contents in the file {d7f3149f-8e29-4b47-bd37-e0f2775a5593}.txt

-Photoshop:PhotoshopThumbnail
-b
/Users/yyyy/Downloads/我们是谁/05.03.19 Biossance iMac-MaecSocial56-0172x.psd
-execute0
-stay_open
False
cmd_lines.txt

Phil Harvey

It sounds like the output buffer size is 8192 bytes.  This could be a system or Qt limitation.

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

yyyy

>It sounds like the output buffer size is 8192 bytes.  This could be a system or Qt limitation.

Only first image got this issue, I can get complete data if I read it two times

-Photoshop:PhotoshopThumbnail
-b
/Users/yyyy/Downloads/我们是谁/05.03.19 Biossance iMac-MaecSocial56-0172x.psd
-execute0
-Photoshop:PhotoshopThumbnail
-b
/Users/yyyy/Downloads/我们是谁/05.03.19 Biossance iMac-MaecSocial56-0172x.psd
-execute1
-stay_open
False
cmd_lines.txt

Phil Harvey

Right.  I expect this is a timing issue related to when the buffer fills and how fast you read it.

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

yyyy