MediaInfo
MediaInfo copied to clipboard
Out of memory after processing about 60k files with MediaInfo GUI
Hello, I am trying to do a report of about 700,000 files with the MediaInfo GUI to export to a CSV file as a custom sheet. It gets stuck with a out of memory error at around 60,000 files. I have plenty of memory allocated as well as am running the 64 bit version so there shouldn't be any restrictions on memory usage.
I was trying with the CLI version, but it doesn't seem to accept my sheet template that works in the GUI version and just spits out the default file info every time, also whenever I use wildcards it gives me nothing.
Windows Server 2012 R2 with 20 GB ram MediaInfo CLI/GUI 21.09
I have plenty of memory allocated as well as am running the 64 bit version so there shouldn't be any restrictions on memory usage.
Actually there is one: the 64-bit installer installs the 64-bit Win explorer plugin but the GUI itself is still 32-bit (we didn't yet move to 64-bit for the GUI, planned but lack of time for working on that)
I was trying with the CLI version
The CLI is definitely the way to go.
but it doesn't seem to accept my sheet template that works in the GUI version
They both use the same engine. Possible to share (public or private) the template? "sheet template"? AFAIK the sheet part has not exportable template and in practice it would be a mess in the UI to have so many files, so the idea here is to get the "custom template" in order to have a text file after that, then you do what you want with this text file.
Here is the template:
Duration.csv
Generated by the GUI:
Using either command line:
mediainfo --Output=file://F:\Duration.csv "f:\Recordings\100\2019-03-01\Call Recording\blahblah.mp3"
mediainfo --Inform=file://F:\Duration.csv "f:\Recordings\100\2019-03-01\Call Recording\blahblah.mp3"
just gives me the general info as if it was not specified.
If I run even without the --Output or --Inform argument with a simple *.mp3
the output is just blank so it is still kind of pointless unfortunately.
Good to know about the GUI, makes sense now.
Here is the template:
OK, sheet template is only for GUI as it is "just" a list of fields and a size for GUI only
Corresponding CLI template:
mediainfo ../Downloads/MDV00428_example.dv "--Output=General;%FolderName%,%F
ileName%,%FileExtension%,%Duration/String5%\r\n"
(can be in a file too). then you can use the file in a spreadsheet processor (Excel...) in an easier manner than in MediaInfo.
*.mp3
it expands on my side:
> more template.csv
General;%FolderName%,%FileName%,%FileExtension%,%Duration/String5%\r\n
> .\MediaInfo.exe *.mp4 "--Output=file://template.csv"
Dir,Film (2020),mp4,00:00:10.920 (00:00:10:23)
Dir,Space ,mp4,00:00:10.920 (00:00:10:23)
Dir,a,mp4,00:00:10.920 (00:00:10:23)
Looks like that string worked for me this time. I think I needed extra quotations around the --Output part as I was trying that way before but never had any success.
Found another bug #538 showing the same issue. Might have to downgrade my version of mediainfo to get it to work.
Thanks for your help.
Ya, it is definitely a problem between versions, see below:
F:\RingCentral Old Recordings\100\2019-03-01\Call Recording>f:\MediaInfo_CLI_21.09_Windows_x64\MediaInfo.exe *.mp3 "--Output=General;%FolderName%,%FileName%,%FileExtension%,%Duration/String5%\r\n"
<crickets>
F:\RingCentral Old Recordings\100\2019-03-01\Call Recording>f:\MediaInfo_CLI_19.04_Windows_x64\MediaInfo.exe *.mp3 "--Output=General;%FolderName%,%FileName%,%FileExtension%,%Duration/String5%\r\n"
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-165633_+1xxxxxxxxxx_Automatic_10471008xxx24,mp3,00:17:18.240
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-182512_+1xxxxxxx_Automatic_104715250xx4,mp3,00:02:57.840
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-182855_+1xxxxxx0_Automatic_104xxx4135024,mp3,00:00:52.632
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-183433_+17xxxxxx03x6_Automatic_104715xxx9024,mp3,00:00:50.832
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-185345_+1xxxx48xx0_Automatic_104716xxx7024,mp3,00:00:54.000
The other thing that I am noticing is that the CLI does not recursively go through folders, while the GUI does. Is there a way to do that with the CLI directly, as I am still stuck in the water without that. Could not find that in the --help.
Thanks again.
Ya, it is definitely a problem between versions, see below:
The linked ticket is about that an is not closed.
The other thing that I am noticing is that the CLI does not recursively go through folders
I does
.\MediaInfo.exe "--Output=file://template.csv" a
a,a,mp4,00:00:10.920 (00:00:10:23)
a\a,a,mp4,00:00:10.920 (00:00:10:23)
If you speak about wildcard, true it does not but the GUI does not too AFAIK.
Thanks for the update. Yes I am aware, just tagging for completeness sake, fortunately I am not needing to use any features from the new version so the 19.04 version works just fine.
Ok, so some observations. My root folder F:\Old Recordings
has no files in it, just directories. So if you run without wildcard you get help info:
F:\Old Recordings>f:\MediaInfo_CLI_19.04_Windows_x64\MediaInfo.exe "--Output=General;%FolderName%,%FileName%,%FileExtension%,%Duration/String5%\r\n"
Usage: "MediaInfo [-Options...] FileName1 [Filename2...]"
"MediaInfo --Help" for displaying more information
If you run it with *.mp3
you get crickets:
F:\Old Recordings>f:\MediaInfo_CLI_19.04_Windows_x64\MediaInfo.exe "--Output=General;%FolderName%,%FileName%,%FileExtension%,%Duration/String5%\r\n" *.mp3
<crickets>
But if you run it with *.*
or *
it works fine:
F:\Old Recordings>f:\MediaInfo_CLI_19.04_Windows_x64\MediaInfo.exe "--Output=General;%FolderName%,%FileName%,%FileExtension%,%Duration/String5%\r\n"
*.*
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-165633_+xxxxxxx182_Automatic_1047xxxxx10xx,mp3,00:17:18.240
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-182512_+15xxxxxxx_Automatic_104715250xx4,mp3,00:02:57.840
F:\Old Recordings\100\2019-03-01\Call Recording,Outgoing_20190301-182855_+xxxxxxAutomatic_104715xxx,mp3,00:00:52.632
So I think I got it all figured out now. Just have to be specifically unspecific on how you specify things or it won't work.
Thanks for your help.