View Full Version : Output sheet view to a text file in MediaInfo
loninapleton
29th June 2020, 22:31
I have been struggling with just making a sheet view text file in MediaInfo. It's probably an easy do in Export ->
But I'm not getting a result. The Export screen with 10 options or whatever it is just makes it confusing.
MediInfo searches keep referencing command line.
Therefore In Win7:
Please give the _steps_ to make a text file in the sheet mode seen in View of MediaInfo. Start with loading the program.
tebasuna51
30th June 2020, 08:40
If you want a 'sheet view text file' to be oppened in Excel (Office) or Calc (LibreOficce) you can try the 'CSV' format (https://en.wikipedia.org/wiki/Comma-separated_values) in Export screen.
If you want a standard text file, to be read be Notepad or Writer (LibreOficce), the 'sheet' mode don't have sense, use the 'text' mode instead.
Gavino
30th June 2020, 17:03
... don't have sense ...
Teba, the Spanish phrase 'no tiene sentido' is better expressed in English as 'doesn't make sense'.
loninapleton
30th June 2020, 18:29
Aside from the language proprietis I _have not understoood_ these verbal descriptions.
Give the steps:
Load MKV > MediaInfo > File > Export > Text Tab >
Here is where I get nothing. They want to deposit the file in MediaInfo program someplace. When I try to
put it on the desktop or give it a name-- all of that. I cannot locate the supposed text file made.
I've tried just saving the "example" and then do a search for it and nother is found. This should be dirt simple.
Giving steps is the simple solution.
stax76
30th June 2020, 19:20
Maybe you can get it with another app:
https://github.com/stax76/MediaInfo.NET
tebasuna51
1st July 2020, 00:36
Yes, my english is poor.
And maybe I can't understand loninapleton.
What is the problem to write the desired location (1) or click in (2) to select folder and name.
loninapleton
2nd July 2020, 08:03
Yes I have got that much now.
But what I see in various 'tags' to for example an MP4
movie seems to require more editing than I want to bother with.
I'll give an example of that base text mode in your example and then show what is requested by a site I use. It can't be that difficult. People do hundreds.
Next time I'll have the samples.
loninapleton
3rd July 2020, 00:29
This is from Media Info. I just deleted the name for personal reasons
General
Unique ID : 200511826934187819816573694852055602650 (0x96D92C54D85C27696D87AC2DFDDE95DA)
Complete name Part One.mkv
Format : Matroska
Format version : Version 4
File size : 383 MiB
Duration : 1 h 20 min
Overall bit rate : 662 kb/s
Encoded date : UTC 2017-08-22T20:57:21Z
Writing application : HandBrake 1.0.7 2017040900
Writing library : Lavf57.7.2
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 148 r2708 86b7198
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=24.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients : BT.601
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 1 h 20 min
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -21 ms
Title : Stereo
Language : English
Default : Yes
Forced : No
Duration_Source : General_Duration
Text #1
ID : 3
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : English
Default : No
Forced : No
Text #2
ID : 4
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : French
Default : No
Forced : No
Text #3
ID : 5
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : German
Default : No
Forced : No
Text #4
ID : 6
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : Spanish
Default : No
Forced : No
Text #5
ID : 7
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : Italian
Default : No
Forced : No
Text #6
ID : 8
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : Dutch
Default : No
Forced : No
Text #7
ID : 9
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Compression mode : Lossless
Language : English
Default : No
Forced : No
Menu
00:00:00.000 : :Chapter 1
00:02:09.129 : :Chapter 2
00:05:03.428 : :Chapter 3
00:32:31.950 : :Chapter 4
00:48:47.425 : :Chapter 5
01:20:47.885 : :Chapter 6
Then a sample of the desired format. (not the same content)
I don't know how to get there regardless of how simple it may be.
MEDIAINFO
Container = Matroska (mkv)
Duration = 00:49:33.984
Filesize = 3.0 GiB
Overall BitRate = 8 600 kb/s
Video
Codec info = AVC High@L4 CABAC / 4 Ref Frames
Resolution = 1920x1080
Display AR = 1.778 (16:9)
Bitrate = 7 765 kb/s
Framerate = CFR 25.000
Samples = YUV, 4:2:0, 8 bits
Encoder = x264 - core 160 r3000 33f9e14
Audio
Codec info = AC-3
Channels = 2 (2/0/0)
Bitrate = 192 kb/s CBR
Samplerate = 48000
Languaje = Spanish
Audio
Codec info = E-AC-3
Channels = 6 (3/2/0.1)
Bitrate = 640 kb/s CBR
Samplerate = 48000
Languaje = Italian
Subs
Format = UTF-8
Languaje = Spanish
Subs
Format = UTF-8
Languaje = Spanish
Subs
Format = UTF-8
Languaje = Italian
tebasuna51
3rd July 2020, 11:38
You must use the MediaInfo command line version.
Read the ...MediaInfo\Contrib\CLI_Help.doc and you can create a loninapleton.txt file (attached) to format the output and used like this:
C:\Portable\MediaInfo\MediaInfo.exe --Inform=file://C:\Portable\MediaInfo\loninapleton.txt "your_input.mkv" >Your_info.txt
loninapleton
3rd July 2020, 19:12
Ok this is helpful. I didn't know if CLI was a function of the program or a CLI in an operating system. I'll review what you've shown. Very likley more questions will follow.
Apologies for an inappropriate attachment.
loninapleton
3rd July 2020, 19:31
Can I make a template in Notepad for the whole path needed and just change out the individual file name? And is this invoked at
the CMD prompt?
In the example
C:\Portable\MediaInfo\MediaInfo.exe --Inform=file://C:\Portable\MediaInfo\loninapleton.txt "your_input.mkv" >Your_info.txt
I'd have to do by rote the path at C:
c\my folder >subfolder > mkv name
I am not knowledgeable on handling directory trees and such at system. Can you help with the needed string. Then I could paste from a Notepad template.
I'll try some practice but some sort of streamlining would be helpful.
patul
4th July 2020, 12:20
Am a lazy person and never care enough to find better solution, but for multiple files operations, I usually just create a batch file, by first creating the list of the files to be processed:
dir /b *.mkv > output.txt
Then I will open the output.txt in text editor, using column mode, add the additional commands. In your case will be
C:\Portable\MediaInfo\MediaInfo.exe --Inform=file://C:\Portable\MediaInfo\loninapleton.txt " ==> as prefix
" >Your_info.txt ==> as suffix
If it's too complex to handle using text editor, I would use excel instead. Then I will save it as batch file (*.bat) and run it.
There's also PowerShell that can do this in one liner set of commands using pipes, but I've never been particularly fond of PowerShell.
StainlessS
4th July 2020, 15:27
This seems to work
MediaInfo.BAT [or MediaInfo.CMD]
REM https://forum.doom9.org/showthread.php?p=1917515#post1917515
REM https://forum.doom9.org/showthread.php?p=1908619#post1908619
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)
REM We DO NOT LIKE ACCENTS IN FILE NAMES.
setlocal
REM Where to Find MediaInfo CLI version, eg "C:\Portable\MediaInfo\MediaInfo.exe"
set MEDIAINFO="C:\BIN\MediaInfo.exe"
REM Where to Find Inform.txt template, eg "C:\Portable\MediaInfo\loninapleton.txt"
set INFORM="C:\BIN\Inform.txt"
REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same dir as .Bat or .Cmd file)
set INDIR="."
REM Where to place OUTPUT files (MUST exist), No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR=".\OUTPUT"
REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (
%MEDIAINFO% --Inform="file://%INFORM%" "%INDIR%\%%A" >"%OUTDIR%\%%~nxA.txt"
)
Pause
You need edit (see REM's) for you system, my MediaInfo CLI version is in C:\BIN\
Modified from bat here:- https://forum.doom9.org/showthread.php?p=1908619#post1908619
which was originally written by someone else, and just has some mods by me.
Here is result of 2 files out of about 8 I tested with, no probs. (I used Tebasuna51 loninapleton.txt RENAMED to C:\BIN\Inform.txt)
big_buck_bunny_720p_h264.mov.txt
MEDIAINFO
Container = MPEG-4 (mov)
Duration = 00:09:56.462
Filesize = 397 MiB
Overall BitRate = 5 590 kb/s
Video
Codec info = AVC Main@L3.1 2 Ref Frames
Resolution = 1280x720
Display AR = 1.778 (16:9)
Bitrate = 5 147 kb/s
Framerate = CFR 24.000
Samples = YUV, 4:2:0, 8 bits
Encoder =
Audio
Codec info = AAC LC
Channels = 6 (3/2/0.1)
Bitrate = 448 kb/s CBR
Samplerate = 48000
Languaje = English
LowBitrateAnime.mkv.txt
MEDIAINFO
Container = Matroska (mkv)
Duration = 00:03:28.683
Filesize = 1.8 MiB
Overall BitRate = 71.3 kb/s
Video
Codec info = AVC High@L4 CABAC / 16 Ref Frames
Resolution = 720x480
Display AR = 1.778 (16:9)
Bitrate =
Framerate = CFR 23.976
Samples = YUV, 4:2:0, 8 bits
Encoder = x264 - core 80 r1373+1 85eb400
Audio
Codec info = AAC HE-AACv2 / HE-AAC / LC
Channels = 2 / 1 / 1 (1/0/0)
Bitrate =
Samplerate = 48000 / 48000 / 24000
Languaje =
I used OUTPUT directory in same directory as BAT file, it MUST exist.
EDIT: Processes all media files with target file extensions that are within the INDIR input directory.
EDIT: As well as NOT liking SPACES in file names, it dont like accents either. [either can break CLI functionality]
EDIT: To change output format, just edit the INFORM text file [in this/my case] "C:\BIN\Inform.txt" as per MediaInfo_CLI docs.
loninapleton
4th July 2020, 20:43
This certainly looks like a good solution which I can simply
change some input information. I cannot understand how others are doing it: multicolored text, centering. But how to get that from MediaInfo text files is confounding.
I'll review what I can of this. I prefer to print to paper but during my house stay during the Superbug I have not gotten to a library where I would do it.
Is the batch file tested so it actually runs. Any tips on doing this so I don't run into any jams.
StainlessS
4th July 2020, 20:45
It runs just fine on my system and paths, should not be too difficult to alter for yours, just no SPACES or Accents in your filenames.
loninapleton
4th July 2020, 20:48
After reading more carefully, I see I may have been missing any and all MediaInfo CLI. Is this a separate install. Or is it found in
the MediaInfo folder? If not, where should it go? Apologies for going through such a base level tutorial..
StainlessS
4th July 2020, 21:14
https://mediaarea.net/en/MediaInfo/Download/Windows
See under "Interface" column. I think it comes with the doc supplied by a user some years ago.
EDIT: Actualy its not supplied, so here it is [ User contribution, MediaInfo CLI_Help.Doc] :- http://www.mediafire.com/file/5m0gahiiuwfjisg/MediaInfo_CLI_Help.7z/file
tebasuna51
5th July 2020, 00:25
EDIT: Actualy its not supplied, so here it is [ User contribution, MediaInfo CLI_Help.Doc] :- http://www.mediafire.com/file/5m0gahiiuwfjisg/MediaInfo_CLI_Help.7z/file
Is supplied only in 32 bits versions, I don't know for what.
Here is a big list of key names, I don't remember how I make it and can't guarantee than work all, but you can try:
StainlessS
5th July 2020, 00:37
Thanks Teb, I had only looked at x64.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\root>mediainfo
Usage: "MediaInfo [-Options...] FileName1 [Filename2...]"
"MediaInfo --Help" for displaying more information
C:\Users\root>mediainfo --help
MediaInfo Command line,
MediaInfoLib - v0.7.88
Usage: "MediaInfo [-Options...] FileName1 [Filename2...]"
Options:
--Help, -h
Display this help and exit
--Help-Output
Display help for Output= option
--Help-AnOption
Display help for "AnOption"
--Version
Display MediaInfo version and exit
--Full , -f
Full information Display (all internal tags)
--Output=HTML
Full information Display with HTML tags
--Output=XML
Full information Display with XML tags
--Output=EBUCore
Full information Display with EBUCore compliant XML tags
--Output=...y
Template defined information Display
--Info-Parameters
Display list of Inform= parameters
--Language=raw
Display non-translated unique identifiers (internal text)
--LogFile=...
Save the output in the specified file
--BOM
Byte order mark for UTF-8 output
--Ssl_CertificateFileName=...
File name of the SSL certificate.
The default format is "PEM" and can be changed
with --Ssl_CertificateFormat.
--Ssl_CertificateFormat=...
File format of the SSL certificate.
Supported formats are "PEM" and "DER"
--Ssl_PrivateKeyFileName=...
File name of the SSL private key.
The default format is "PEM" and can be changed
with --Ssl_PrivateKeyFormat.
Note: private key with a password is not supported.
--Ssl_PrivateKeyFormat=...
File format of the SSL private key.
Supported formats are "PEM" and "DER"
--Ssl_CertificateAuthorityFileName=...
File name of the SSL certificate authorities
to verify the peer with.
--Ssl_CertificateAuthorityPath=...
Path of the SSL certificate authorities
to verify the peer with.
--Ssl_CertificateRevocationListFileName=...
File name of the SSL certificate revocation list.
The format is "PEM"
--Ssl_IgnoreSecurity=...
Does not verify the authenticity of the peer's certificate
Use it at your own risks
--Ssh_PublicKeyFileName=...
File name of the SSH private key.
Default is $HOME/.ssh/id_rsa.pub or $HOME/.ssh/id_dsa.pub
if the HOME environment variable is set, and just
"id_rsa.pub" or "id_dsa.pub" in the current directory
if HOME is not set.
Note: you need to set both public and private key.
--Ssh_PrivateKeyFileName=...
File name of the SSH private key.
Default is $HOME/.ssh/id_rsa or $HOME/.ssh/id_dsa
if the HOME environment variable is set, and just
"id_rsa" or "id_dsa" in the current directory
if HOME is not set.
Note: you need to set both public and private key.
Note: private key with a password is not supported.
--Ssh_KnownHostsFileName=...
File name of the known hosts
The format is the OpenSSH file format (libssh2)
Default is $HOME/.ssh/known_hosts
if the HOME environment variable is set, and just
"known_hosts" in the current directory
if HOME is not set.
--Ssh_IgnoreSecurity
Does not verify the authenticity of the peer
(you don't need to accept the key with ssh first)
Use it at your own risks
Maybe something like this for big list, in C:\Z\ directory
MediaInfo -f --Info-Parameters --Language=raw >C:\Z\MI_Info_Parameters.txt
EDIT:
The raw parameter names are those names required for extraction of data, ie not human language style names for output(which might be converted to non English and also contain eg SPACES).
Looks like above outputs same text file as attached above by Tebasuna51.
tebasuna51
5th July 2020, 01:00
I cannot understand how others are doing it: multicolored text, centering.
multicolored text,
centering.
That's are options when you write in the web.
Paste your info and edit it. You can see that here but not in Notepad.
loninapleton
6th July 2020, 18:02
Back briefly. I have not lost interest but may have lost my _place_ in all this.
Yeah, the color stuff is beside the point but I see how it could
be in the code at the website editor.
loninapleton
6th July 2020, 21:43
Did I mention this would be a rote process?
Idefinitely did.
Step one today: I found the 20.03 MediaInfo CLI, and unzipped the content to it's folder. Running the CLI just winked in and out so I know there's more to do.
Where is the CLI folder properly installed? I download things to the desktop. Mention was made of the BIN folder but I hardly
know where that would be.
Down the line we can get to installing batch files.
StainlessS
6th July 2020, 23:10
C:\BIN\ is a folder I created and where I imprison some tools, and is also in my system environment PATH, you can put yours wherever you like but must edit the Bat file accordingly.
Read the instructions in Bat file, that was the intention of writing them.
If still in doubt, read the thread linked in Bat post, ie :- https://forum.doom9.org/showthread.php?p=1908619#post1908619
I had to spell everything out 3 or 4 times in that thread too.
loninapleton
7th July 2020, 22:41
I have made the \BIN\ file.
I have captured the .bat file to notepad and it runs.
Reading old style DOS is very hard for me. What needs to be modified in the unique .bat file for
the movie called myfirstrecode.mkv
If it deposits a .txt file in \BIN (I don't know if I even understand that right) how do I
get the .txt back up into Win7.
I did try to use the application files back in post #1 or wherever it was but I failed
to get a result or deal with the minimal screen info.
Now for the prize question: Why no Drag and Drop for MediaInfo Basic (the initial screen)? The Drag and Drop program would have some check boxes mirroring the MediaInfo fields where you can select the ones you want and print out a simple text file.
I must be dreaming.
StainlessS
8th July 2020, 01:59
Below starting with REM is an instruction or COMMENT.
REM Where to Find MediaInfo CLI version, eg "C:\Portable\MediaInfo\MediaInfo.exe"
set MEDIAINFO="C:\BIN\MediaInfo.exe"
I have made the \BIN\ file.
If that is "C:\BIN" then is as required by default and is where to place your MediaInfo.exe (CMD line version).
REM Where to Find Inform.txt template, eg "C:\Portable\MediaInfo\loninapleton.txt"
set INFORM="C:\BIN\Inform.txt"
Place file supplied by Tebasuna51 (ie loninapleton.txt, but renamed to Inform.txt") in C:\BIN\Inform.txt, just as it says.
REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same dir as .Bat or .Cmd file)
set INDIR="."
Create some directory for the bat and movie files, anywhere you like, eg
C:\MY_MEDIAINFO_STUFF
Put your bat file there, and also your movie files. set INDIR="." will find movie files in same directory as the bat file.
REM Where to place OUTPUT files (MUST exist), No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR=".\OUTPUT"
Create OUTPUT directory inside your chosen bat file directory eg
C:\MY_MEDIAINFO_STUFF\OUTPUT
MediaInfo result text files will be written there.
Thats it (I must be real bad at writing instructions).
So, ensure MediaInfo.Exe (CMD Line VER$) and Inform.txt both in C:\BIN\
Create some directory for bat and media files, also create OUTPUT in same directory as bat file.
Copy movie files into same dir as bat file.
click bat file.
sorted.
See MediaInfo documentation for format of Inform.txt, this determines how MediaInfo output will look, thats your problem.
Drag & drop, no idea if possible, I dont use it that much. [EDIT: Not sure if I've ever used drag n drop]
EDIT
REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (
Above in blue are the file extension of movie types that it will batch process all at once. Can remove those you dont use, or add others (so long as MediaInfo supports extension).
Extensions should be as eg "*.MOV", and each SPACE separated.
EDIT:
The "." file and directory options eg ".\OUTPUT" just mean relative to the directory the bat file is in, you could just as well use eg "D:\OUTPUT" if you want to specify full path.
Also, could eg put MediaInfo in same directory as bat, and use
set MEDIAINFO=".\MediaInfo.exe"
And same for Inform.txt eg
set INFORM=".\Inform.txt"
So could if required make the whole thing relative to bat file, so can just pick up the directory containing bat + other files, and move the whole lot wherever you want to.
StainlessS
8th July 2020, 03:16
Here a self contained setup, can pick up the My_MediaInfo_Stuff folder and move it wherever you like.
Directory structure.
My_MediaInfo_Stuff\
BIN\inform.txt # Inform Template
BIN\mediainfo.exe # Cli version
OUTPUT\ # Where output txt files will be written
__MEDIAINFO_To_OUTPUT.Bat # Bat file, Leading double underscore sorts at top of file list.
#
# Various media files
#
big_buck_bunny_720p_h264.mov
black_frames_sample3_huffy.avi
deduptest.mp4
dragon ball z film to blu-ray feature 1080p(2).mp4
f117-dosbox-intro.avi
lowbitrateanime.mkv
sample.mp4
__MEDIAINFO_To_OUTPUT.Bat (Modified Bat file)
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)
REM We DO NOT LIKE ACCENTS IN FILE NAMES.
setlocal
REM Where to Find MediaInfo CLI version, eg "C:\Portable\MediaInfo\MediaInfo.exe"
set MEDIAINFO=".\BIN\MediaInfo.exe"
REM Where to Find Inform.txt template, eg "C:\Portable\MediaInfo\loninapleton.txt"
set INFORM=".\BIN\Inform.txt"
REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same dir as .Bat or .Cmd file)
set INDIR="."
REM Where to place OUTPUT files (MUST exist), No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR=".\OUTPUT"
REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (
%MEDIAINFO% --Inform="file://%INFORM%" "%INDIR%\%%A" >"%OUTDIR%\%%~nxA.txt"
)
Pause
EDIT: Actually coped just fine with "dragon ball z film to blu-ray feature 1080p(2).mp4", ie SPACE's in filename, perhaps it is just ffmpeg
that has probs with SPACE in filenames.
loninapleton
8th July 2020, 19:22
You are the code king.
I think I'm figuring out what I'm doing wrong and have been missing: The batch file acts on a .txt input file which you called loninapleton-- not a media file .mkv. which would go into MediaInfo.
With this insight I can perhaps do some copy and replace. And I'll look at the new help you've added.
I still think a drag and drop solution is a good idea. I must be dreaming.
loninapleton
8th July 2020, 20:52
I have begun putting things in a folder-- CLI program folder - where edits are easier to manage than the desktop. I'm doing this line by line so it's really slow. But I enjoy doing it for a limited time then come back to it. If you want to continue at my snail's pace ok.
From the two samples you've shown, it looks like I'll have to enter a series of field information lines for each of the pieces of MediaInfo. In other words your slimmed down MediaInfo on Buck Bunny.
That's ok, I'm fairly patient at data entry. I just get frustrated with DOS error messages.
But try not to introduce too many of other things even as you're trying to help. We can build this thing-- though it's like re-inventing some wheel from an earlier time.
I am editing the batch file as a .txt in Notepad. I know of no good way to edit the .bat itself. Perhaps in Notepad++. But there's this multicolored mess when I open it in Notepad++. I have to figure out how to turn off the colors and make it legible.
StainlessS
8th July 2020, 21:37
The batch file acts on a .txt input file which you called loninapleton-- not a media file .mkv
loninapleton.txt [Or as I renamed it Inform.txt] is a MediaInfo template file, see MediaInfo docs,
it instructs MediaInfo.Exe what items to output into the result txt file and how to format them.
(nothing really to do with the batch file, other than to provide it to MediaInfo.Exe).
From the two samples you've shown ...
The batch file actually output 8 txt data files for a single run of bat file, I only showed two of them [formatted as per Tebasuna51 loninapleton.txt template file].
It may well be that the GUI version MediaInfo does drag n drop, I have no idea, I dont use drag n drop.
loninapleton
9th July 2020, 18:47
I will catch up with what you have added. But just now I have put everything in the program folder at C:\Program Files\MediaInfoCLI and
trimmed off all the underscores and such from the program download. The other thing I do slowly is type and not touch type at all. I added a couple REMs to just say what the batch and text files are called.
Looks like I will not need the \BIN\ if all is stored in the program directory.
So where I see that, I have to change it yet.
The only way I can get this going is to have you proof it like any teacher. When I think I've done all I can, I'll post it here.
loninapleton
22nd July 2020, 20:19
I don't know if I'll ever get the code since I don't understand the lingo. Just too slow at it.
While gone I saw that there is a quick workaround for my meager needs: Load File MKV or other > Media Info > View > Text > Rt click >Select All > Copy to Notepad and edit what lines I want to keep.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.