"Out of memory!" error when extracting GPS data from Large MP4 Video files

Started by dzeek, June 05, 2020, 11:13:27 AM

Previous topic - Next topic

dzeek

I was able to avoid the "Out of memory!" condition by running the Perl version of exiftool using the Portable version of Strawberry Perl for Windows. I had to modify the bat file used to start it so that I could run it with the arguments I need to pass to exiftool at runtime. Thank you StarGeek for your help!

It would still be interesting to hear why the ExifTool exe cannot use more memory and avoid this error. The problem seems to have existed for a long time.

StarGeek

That I cannot answer.  I don't know if it's a problem with the Windows command line or the Perl PAR packer that the Windows .exe version uses.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

obetz

Quote from: dzeek on June 07, 2020, 06:30:10 AM
I was able to avoid the "Out of memory!" condition by running the Perl version of exiftool using the Portable version of Strawberry Perl for Windows.

did you use the 64 bit version of portable Strawberry Perl or the 32 bit version?

Then I could provide a 64bit version of my installer mentioned above.

Oliver

Phil Harvey

I don't know why there is a memory limit like this.  It seems to be a limitation only for command-line apps.

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

obetz

it might be also a 64bit <-> 32bit issue since the amount of memory was huge.

That's why I would appreciate feedback from dzeek.

Phil Harvey

Yes, it would be good to know if the 64-bit app impacts this, but I don't think ExifTool should be anywhere near the 32-bit limit here.  Most of the memory usage should be in storing the large number of extracted tags.  The video data itself isn't loaded into memory, so the huge size of the file shouldn't be a problem (other than the fact that it contains so many GPS tags).  If I am correct here, there should be no memory problem without the -ee option.

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

obetz

Quote from: Phil Harvey on June 09, 2020, 09:09:18 AM
I don't think ExifTool should be anywhere near the 32-bit limit here.  Most of the memory usage should be in storing the large number of extracted tags.  The video data itself isn't loaded into memory, so the huge size of the file shouldn't be a problem

Maybe I misinterpreted the OP reporting 1.9GB for ExifTool:

Quote from: dzeek on June 05, 2020, 11:13:27 AM
Monitoring exiftool while its running shows that the failure occurs when process memory gets to approx. 1.9 GB.

Oliver

dzeek

Quote from: obetz on June 07, 2020, 03:53:40 PM
Quote from: dzeek on June 07, 2020, 06:30:10 AM
I was able to avoid the "Out of memory!" condition by running the Perl version of exiftool using the Portable version of Strawberry Perl for Windows.

did you use the 64 bit version of portable Strawberry Perl or the 32 bit version?

Then I could provide a 64bit version of my installer mentioned above.

Oliver

I am using the 64-bit version of the portable Strawberry Perl for Windows.

This enabled the perl version of exiftool to use approx. 13 GB of process memory vs the 1.9 GB when running the exe versions.

Sorry for the delay responding.

Phil Harvey

Quote from: obetz on June 09, 2020, 09:29:06 AM
Maybe I misinterpreted the OP reporting 1.9GB for ExifTool:

Right, sorry.  You are correct.  It really was using that much memory!

So a 64-bit version should fix 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 ($).

dzeek

Quote from: Phil Harvey on June 09, 2020, 09:44:03 AM
Quote from: obetz on June 09, 2020, 09:29:06 AM
Maybe I misinterpreted the OP reporting 1.9GB for ExifTool:

Right, sorry.  You are correct.  It really was using that much memory!

So a 64-bit version should fix it. :)

- Phil

Could I ask why a 64-bit version of the exe versions of ExifTool for Windows does not already exist? Are there disadvantages to using a 64-bit version?

Phil Harvey

Quote from: dzeek on June 09, 2020, 09:47:20 AM
Could I ask why a 64-bit version of the exe versions of ExifTool for Windows does not already exist? Are there disadvantages to using a 64-bit version?

Until now, there was no clear reason to build this version.  And it is more work to build two versions.  Also, the binary is likely larger, and I don't think that there are any speed improvements.  But Oliver will know more about this.

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

obetz

Hi dzeek,

no problem, thanks for the reply.

Your case is one of the rare opportunities to improve my package.

Would you test a 64 bit version of my "alternate ExifTool" package? I'm not sure when I can prepare it, maybe this evening, maybe Friday.

Oliver

dzeek

Quote from: obetz on June 09, 2020, 09:55:31 AM
Hi dzeek,

no problem, thanks for the reply.

Your case is one of the rare opportunities to improve my package.

Would you test a 64 bit version of my "alternate ExifTool" package? I'm not sure when I can prepare it, maybe this evening, maybe Friday.

Oliver

Yes. I would be happy to test a 64-bit version. No rush. Thank you.

dzeek

Quote from: Phil Harvey on June 09, 2020, 09:54:40 AM
Quote from: dzeek on June 09, 2020, 09:47:20 AM
Could I ask why a 64-bit version of the exe versions of ExifTool for Windows does not already exist? Are there disadvantages to using a 64-bit version?

Until now, there was no clear reason to build this version.  And it is more work to build two versions.  Also, the binary is likely larger, and I don't think that there are any speed improvements.  But Oliver will know more about this.

- Phil

Oh. Sorry. I saw some posts reporting the same problem in the past so I thought there might an issue creating or using a 64-bit version.

obetz

Quote from: dzeek on June 09, 2020, 11:47:50 AM
Yes. I would be happy to test a 64-bit version. No rush. Thank you.

Here we go: https://oliverbetz.de/cms/files/Artikel/ExifTool-for-Windows/exiftool-11.99_64.zip

Please check that you don't have any other Perl installation in the Path environment variable and tell me whether my 64 bit version solves your issue.

Oliver