Log in

View Full Version : MediaInfo Client library MIFO_Lib v1.01


StainlessS
5th March 2016, 00:08
MediaInfo Client library MIFO_Lib v1.01
MIFO_Library.Avsi v1.01, MediaInfo library routines.
Req GScript, RT_Stats, CallCmd. Using MediaInfo Cli v0.7.83

Library of script functions to access MediaInfo Command Line version, to provide media information on named media file.
Can do Template String and Template file searches (best for Info Display), and extract individual parameter items
(for making decisions in real time, eg source filter selection based on whether AVI is lossless [AviSource] or Lossy [FFMPegSource or L-Smash to Index the file]).
Also can extract full/Raw information or only specific sections.

MIFO_Library.avsi Part 1 (too big)

######
# MIFO_Library.Avsi v1.01, Req GScript, RT_Stats, CallCmd. Using MediaInfo Cli v0.7.83
######

######
# If Below Global Variable Exists then will use it, Otherwise MediaInfo.Exe must live somewhere in Path of system Environment.
#Global Glb_MEDIAINFO_PATH = "C:\BIN\MediaInfo.Exe" # Modify for your system, Comment out if Command line MediaInfo.Exe already in system Path.
######

######
# If Below Global variable exists as FileName (ie String), then will Write latest MediaInfo commands to the named file (successful or
# otherwise).
# (Enable to track bugs, test used command in MediaInfo CLI).
# Comment out to Disable. Can Enable anywhere, ie does not have to be enabled in this file only.
#Global Glb_MEDIAINFO_LAST_COMMAND="MediaInfo_Latest_Command.txt"
######

######
# If Below Global variable exists as FileName (ie String), then will Write latest SUCCESSFUL MediaInfo results to the named file.
# Comment out to Disable. Can Enable anywhere, ie does not have to be enabled in this file only.
#Global Glb_MEDIAINFO_LAST_RESULT="MediaInfo_Latest_Result.txt"
######


/*
MediaInfo.Exe Command line, "MIFO_" Library. http://forum.doom9.org/showthread.php?t=173268

Some Notes, mainly for core MIFO_Get() function, but also apply to other functions:-

Parameter, TemplateString, and TemplateFile modes are mutually exclusive, when all three are "" then MIFO_Get is in section extract mode.
Parameter mode, does a MediaInfo search for a parameter returning result, where Parameter is used without enclosing Percent chars (%) eg
"DisplayAspectRatio" not "%DisplayAspectRatio%". Parameter mode requires a none "" Section name and Stream number.
TemplateString mode does MediaInfo search using a Template String.
TemplateFile mode does MediaInfo search using a Template File.
Template contents are not interfered with by MIFO_Lib, however supplied Section and Stream are handled as below.
Template modes seem to work better with the Section name supplied in the template rather than as Section and Stream number.

Section (string) can be can be empty string "" (ie ALL), "General", "Video", "Audio", "Text", "Image", "Menu". Case IS significant within
MediaInfo, but we will ensure that eg 'video' is converted to 'Video' for you.
Where Parameter and both Templates are "" and Section is a particular section type (ie NOT ""), then
MIFO_Get() will call MediaInfo with empty Section ("") and then will extract the requested
Section (including any appended stream number identifier) for you.
If you supply a Section of "", then we will return ALL results without attempting any extraction.

Stream, Int. Where Section = "" (ie ALL sections), then Stream number is ignored altogether.
When Stream Number is not ignored (Section != "") then Stream=0 OR Stream=1 denotes the first stream in Section no matter how many streams
there are (so long as there are some streams of course).
We differ from MediaInfo in that for MediaInfo stream 0 denotes first stream where there is only a single stream, and stream 1 is the
first stream when there is more than one stream (we dont like this and interpret both 0 and 1 to mean first stream irrespective of number
of streams). Media Info expects eg for the first stream of single stream audio "Audio" in call to get the section, and for 1st stream in
multistream audio expect "Audio #1", we hide this from you. We convert streams 0 or 1 to be "Audio" for single stream audio and
"Audio #1" for multi stream, you dont have to worry about any of this. Suggest that you use stream=1 to MIFO_StreamCount() result.

If you will be wanting to extract multiple sections, then might be best to request Section = ALL (""), and extract the multiple sections
yourself from the resultant multi-section text string result.

See MediaInfo supplied CLI_Help.Doc for further on MediaInfo use and templates.
*/

########
### Internal Functions::
########

GSCript("""
Function MIFO_Executable() { # If Glob Var exists use it else MediaInfo to be in a sys path.
Return (RT_VarExist("Glb_MEDIAINFO_PATH") && Glb_MEDIAINFO_PATH.IsString && Glb_MEDIAINFO_PATH!="")
\ ? RT_GetFullPathName(Glb_MEDIAINFO_PATH) : "MediaInfo.Exe"
}

Function MIFO_LastCommand() { # Return FullPathName set in Global Glb_MEDIAINFO_LAST_COMMAND, "" if Global var does not exist.
Return (RT_VarExist("Glb_MEDIAINFO_LAST_COMMAND") && Glb_MEDIAINFO_LAST_COMMAND.IsString && Glb_MEDIAINFO_LAST_COMMAND!="")
\ ?RT_GetFullPathName(Glb_MEDIAINFO_LAST_COMMAND):""
}

Function MIFO_LastResult() { # Return FullPathName set in Global Glb_MEDIAINFO_LAST_RESULT, "" if Global var does not exist.
Return (RT_VarExist("Glb_MEDIAINFO_LAST_RESULT") && Glb_MEDIAINFO_LAST_RESULT.IsString && Glb_MEDIAINFO_LAST_RESULT!="")
\ ?RT_GetFullPathName(Glb_MEDIAINFO_LAST_RESULT):""
}

Function MIFO_CheckSection(string Section) {
# Return int -1 if Invalid Name, string "" if null string ("") and ProperCase'd Section if valid name (ie swaps "video" to "Video").
Ret = -1 Sections=RT_String("\nGeneral\nVideo\nAudio\nText\nImage\nMenu\n")
For(n=0,6) {s=RT_TxtGetLine(Sections,n) if(s==Section) {Ret=s n=7}}
Return Ret
}

Function MIFO_EatWhite(string S) {Pos=1 While(RT_Ord(S,pos=Pos)==32 || RT_Ord(S,pos=Pos)==9){Pos=Pos+1}Return MidStr(S,Pos)}

Function MIFO_CallMediaInfo(String Cmd,String Outfn,Bool "Debug",String "myName") {
myName=Default(myName,"MIFO_CallMediaInfo: ") debug=Default(Debug,false)
outfn=(outfn!="")?RT_GetFullPathName(outfn):outfn RT_FileDelete(outfn)
LCommand=MIFO_LastCommand LResult=MIFO_LastResult
(Debug&&LCommand!="")?RT_DebugF("Glb_MEDIAINFO_LAST_COMMAND is set, Writing Current Cmd to '%s'",LCommand,name=myName):NOP
(LCommand!="")?RT_WriteFile(LCommand,"%s",Cmd):NOP
(Debug) ? RT_DebugF("Calling CallCmd",name=myName) : NOP
CallCmd(BlankClip(Length=1,Width=1,Height=1),Open=Cmd,Hide=True,debug=Debug,Synchronous=1) # Call the command, wait command terminated.
Assert(Exist(outfn),RT_String("%sCallCmd FAILED on \n'%s'",myName,Cmd))
Ret=RT_ReadTxtFromFile(outfn) RT_FileDelete(outfn)
Ret=(RT_TxtQueryLines(Ret)==1) ? RT_TxtGetLine(Ret,0) : Ret # Strip N/L for Single line result
(Debug&&LResult!=""&&Ret=="")?RT_DebugF("Result='' NOT Writing Result to '%s'",LResult,name=myName):NOP
(Debug&&LResult!=""&&Ret!="")?RT_DebugF("Glb_MEDIAINFO_LAST_RESULT is set, Writing Current Result to '%s'",LResult,name=myName):NOP
(LResult!=""&&Ret!="")?RT_WriteFile(LResult,"%s",Ret):NOP
Return Ret
}
""") # End Of GScript

########
### User Functions
########

GSCript("""
Function MIFO_Version(Bool "Debug",String "myName") { # Return MediaInfo Command line version number as a String eg "0.7.83".
myName=Default(myName,"MIFO_Version: ") debug=Default(Debug,false) MEDIAINFO=MIFO_Executable
outfn=RT_GetFullPathName("MediaInfo_"+RT_LocalTimeString(File=true)+".txt") # Unique Output text filename, full path
# Need to use system Command.com and redirect Stdout to file, LogFile dont work (also returns error code -1 if only --Version requested).
Cmd=RT_String("cmd /C %s --Version >%c%s%c" ,MEDIAINFO,34,outfn,34) # DONT use quotes around MediaInfo name, command.com will complain.
S=MIFO_CallMediaInfo(Cmd,outfn,Debug,myName)
Pos=1 While(RT_Ord(S,pos=Pos)<48||RT_Ord(S,pos=Pos)>57){Pos=Pos+1} # Hunt first Digit
S=MidStr(S,Pos)
Pos=1 While(RT_Ord(S,pos=Pos)==46||(RT_Ord(S,pos=Pos)>=48&&RT_Ord(S,pos=Pos)<=57)){Pos=Pos+1} # Hunt not (Digit||'.')
Ret=LeftStr(S,Pos-1)
(Debug) ? RT_DebugF("MediaInfo.Exe CLI Version = '%s'",Ret,name=myName) : NOP
return Ret
}

Function MIFO_StreamCount(String Fn,String Section,Bool "Debug",String "myName") {
# Get Int number of streams in Section, (Section can be:- "General", "Video", "Audio", "Text", "Image", "Menu"
myName=Default(myName,"MIFO_StreamCount: ") sn = MIFO_CheckSection(Section)
Fn = (Fn!="") ? RT_GetFullPathName(Fn) : Fn
Assert(Exist(Fn),RT_String("%sMediaFile Does NOT Exist '%s'",myName,Fn))
Assert(sn.IsString && sn!="",RT_String("%sBad Section('%s')",myName,Section))
if(sn=="General") {
Count = 1
} Else {
Fmt="%c%s%c --LogFile=%c%s%c --Inform=General;%%%sCount%% %c%s%c"
MEDIAINFO = MIFO_Executable
outfn=RT_GetFullPathName("MediaInfo_"+RT_LocalTimeString(File=true)+".txt") # Unique Output text filename, full path
Cmd=RT_String(Fmt,34,MEDIAINFO,34,34,outfn,34,sn,34,Fn,34)
Count = RT_NumberValue(MIFO_CallMediaInfo(Cmd,outfn,Debug,myName))
}
return Count
}

Function MIFO_FullSectionName(String Fn,String Section,Int Stream,Bool "Debug",String "myName") {
# Given Media file name Fn, Section, and Stream number, returns full Section Name including stream id eg "Audio" for single audio
# stream or "Audio #1" for first stream in multi-audio stream Fn media file. (ie a fully specified Section name as required by
# MediaInfo).
myName=Default(myName,"MIFO_FullSectionName: ") Debug=Default(Debug,False)
Assert(Stream>=0,RT_String("%sStream Must be >=0 (%d)",myName,Stream))
Result=""
if(Section!="") {
sn = MIFO_CheckSection(Section) Assert(sn.IsString,RT_String("%sBad Section('%s')",myName,Section))
(Debug) ? RT_DebugF("Calling MIFO_StreamCount",name=myName) : NOP
Count = MIFO_StreamCount(Fn,sn,Debug=Debug)
Stream = (Stream==0 || Stream==1) ? Min(Count-1,1) : (Stream<=Count) ? Stream : -1
Assert(Stream>=0,RT_String("%sInvalid Stream number(%d) Last Stream Number = %d",myName,Stream,Count))
Result=(Stream!=0)?RT_String("%s #%d",sn,Stream):sn
}
Return Result
}

Function MIFO_ExtractSectionItem(String SectionText,String Parameter,Bool "Pair",bool "Debug",String "myName") {
# Given Section text extracted via MIFO_ExtractSection (called indirectly via MIFO_Section or MIFO_Get [when Section!="" and
# Parameter and Templates all ""]), finds Parameter in the SectionText and returns the associated data (entire line including
# Parameter if Pair=True [Default False]).
myName=Default(myName,"MIFO_ExtractSectionItem: ") Pair=Default(Pair,False) Debug=Default(Debug,false) Ret = "" # Not Found
ParmLen=Strlen(Parameter) Lines=RT_TxtQueryLines(SectionText)
COLON = RT_Ord(":")
For(i=0,Lines-1) {
SSS=RT_TxtGetLine(SectionText,i).MIFO_EatWhite
if(RT_FindStr(SSS,Parameter,sig=False)==1) {
S=MidStr(SSS,ParmLen+1).MIFO_EatWhite # Strip Parameter from Start and EatWhite
if(RT_Ord(S)==COLON) {
if(Pair) {Ret = SSS} # Return Entire string, both Parameter and data Item
else {Ret = MidStr(S,2).MIFO_EatWhite} # Return just data Item
i = Lines # Break
}
}
}
(Debug) ? RT_DebugF("'%s' = '%s'",Parameter,Ret,name=myName) : NOP # Write Parameter = Extracted Text to DebugView
return Ret
}

Function MIFO_ExtractSection(String Txt,String Section,Int "Stream",Bool "Debug",String "myName") {
# Extract single section from complete MediaInfo result text (where MIFO_Get was called with Section="" ie full text)
# Section Name eg "General", "Video", "Audio", "Text", "Image", "Menu".
# Stream = 0 or 1, will extract first stream no matter if single or multi-stream section.
myName=Default(myName,"MIFO_ExtractSection: ") Stream=Default(Stream,0) Debug=Default(Debug,False)
Assert(Stream>=0,RT_String("%sBad Stream number(%d)",myName,Stream))
sn = MIFO_CheckSection(Section) Assert(sn.IsString && sn!="",RT_String("%sBad Section('%s')",myName,Section))
Lines=RT_TxtQueryLines(Txt) T="" InSect= False
sn=(Stream>1)?sn+" #"+String(Stream) : sn sn_Hash1=sn+" #1"
For(i=0,Lines-1){
S=RT_TxtGetLine(Txt,i)
if(S=="") { # "" is End Of Section
if(InSect) {i=Lines} # End of Extracted Section, All Done, Break
}else {
if(!InSect) {
if(S==sn) {
InSect=True
} else if(Stream<=1 && S==sn_Hash1) {
InSect=True
sn=sn_Hash1 # Is first stream in multi-channel section.
}
}
if(InSect) {T=RT_TxtAddStr(T,S)}
}
}
(Debug) ? RT_DebugF("'%s' Extracting\n%s",sn,T,name=myName) : NOP
Return T
}
""") # End Of GScript


See MediaFire in sig below (MIFO_Lib)

StainlessS
5th March 2016, 00:09
Part 2

Function MIFO_Get(String Fn,String Section,int "Stream",String "Parameter",String "TemplateString",String "TemplateFile",Bool "Full",
\ Bool "Raw", Bool "Debug",String "myName") {
/*
Get, MediaInfo, the core MediaInfo interface (best use the other stub functions to access it).
Where Section can be "" (ie ALL) "General", "Video", "Audio", "Text", "Image", "Menu" (Case Insignificant).
Where Stream can be 1 (default) for FIRST existing stream eg "Audio", or 1+ where more than 1 stream exists (base relative 1) eg
"Audio #1".
If Stream is non zero, then Section will have " #s" appended (where s = Stream number).
Where Parameter can be any parameter in Section (when searching for specific item) eg "DisplayAspectRatio" in "Video" Section
(default""=return all sections text).
To create sample list of usable Parameter strings, from command line try eg 'MediaInfo.exe --Language=raw -f Sample.mp4 >Parameters.txt".
Debug sends CallCmd Info + COMPLETE MediaInfo output to DebugView
NOTE, In MediaInfo Command line version, 'Inform' and 'Output' are synonyms, and interchangeable, (in MI docs/commands, may use either).
Parameter string (default "") is used via MIFO_Item


*/
myName=Default(myName,"MIFO_Get: ")
Stream = Default(Stream,1) Parameter=Default(Parameter,"") TemplateString=Default(TemplateString,"")
TemplateFile=Default(TemplateFile,"") Full=Default(Full,False) Raw=Default(Raw,True) Debug=Default(Debug,False)
Fn = (Fn!="") ? RT_GetFullPathName(Fn) : Fn
Assert(Exist(Fn),RT_String("%sMediaFile Does NOT Exist '%s'",myName,Fn))
Assert(Stream>=0,RT_String("%sStream Must be >=0 (%d)",myName,Stream))
Excl = (Parameter==""?0:1) + (TemplateString==""?0:1) + (TemplateFile==""?0:1)
Assert(Excl<=1,RT_String("%sParameter TemplateString and TemplateFile args are Mutually Exclusive.",myName))
TemplateFile = (TemplateFile!="") ? RT_GetFullPathName(TemplateFile) : TemplateFile
OrgStream=Stream
sn = MIFO_CheckSection(Section) Assert(sn.IsString,RT_String("%sBad Section('%s')",myName,Section)) # sn=="" ALLOWED HERE ie ALL
MEDIAINFO = MIFO_Executable

###
Fmt0=""""%s" %s%s--LogFile="%s" --Inform=%s "%s" """ # MIFO_Lib Extraction Full can be use here.
Fmt1=""""%s" %s--LogFile="%s" --Inform=%s%%%s%% "%s" """ # Parameter (Full is ignored : not relevant)
Fmt2=""""%s" %s--LogFile="%s" -f --Inform=%s"%s" "%s" """ # TemplateString (Full is ignored : not relevant)
Fmt3=""""%s" %s--LogFile="%s" --Inform=%sfile://"%s" "%s" """ # TemplateFile (Full is ignored : not relevant)
###
Result = ""
GSCript("""
if(sn!="") {
(Debug) ? RT_DebugF("Calling MIFO_StreamCount",name=myName) : NOP
Count = MIFO_StreamCount(Fn,sn,Debug=Debug)
Stream = (Stream==0 || Stream==1) ? Min(Count-1,1) : (Stream<=Count) ? Stream : -1
} else {Stream=0} # Stream is ignored if Section = ""
if(Stream>=0) {
outfn=RT_GetFullPathName("MediaInfo_"+RT_LocalTimeString(File=true)+".txt") # Unique Output text filename, full path
RT_FileDelete(outfn) # Delete output file prior to Call
SNS=(Stream!=0)?RT_String("%s #%d",sn,Stream):sn
Mode=(Excl==0)?0:(Parameter!="")?1:(TemplateString!="")?2:3
if(Mode==0) { # Mode = 0, Neither Parameter nor either Template
Cmd=RT_String(Fmt0,MEDIAINFO,(Raw)?"--Language=raw ":"",(Full)?"-f ":"",outfn,SNS+(SNS!=""?";":""),Fn)
} else if(Mode==1) { # Mode = 1, Parameter Only. (Full is ignored : not relevant)
Cmd=RT_String(Fmt1,MEDIAINFO,(Raw)?"--Language=raw ":"",outfn,SNS+";",Parameter,Fn)
} else if(Mode==2) { # Mode = 2 TemplateString. (Full is ignored : not relevant)
Cmd=RT_String(Fmt2,MEDIAINFO,(Raw)?"--Language=raw ":"",outfn,(SNS=="")?"":SNS+";",TemplateString,Fn)
(Debug) ? RT_DebugF("%s TemplateString='%s'",(SNS=="")?"Non-Section":"Section='"+SNS+"'",TemplateString,name=myName) : NOP
} else { # Mode = 3 TemplateFile
Cmd=RT_String(Fmt3,MEDIAINFO,(Raw)?"--Language=raw ":"",outfn,(SNS=="")?"":SNS+";",TemplateFile,Fn)
(Debug) ? RT_DebugF("%s TemplateFile='%s'",(SNS=="")?"Non-Section":"Section='"+SNS+"'",TemplateFile,name=myName) : NOP
}
(Debug) ? RT_DebugF("Calling MIFO_CallMediaInfo",name=myName) : NOP
Result = MIFO_CallMediaInfo(Cmd,outfn,Debug,myName)
(Debug) ? RT_DebugF("MediaInfo: on Section '%s'\n%s",SNS,Result,name=myName) : NOP
if(Result !="" && Mode==0) {
Line=RT_TxtGetLine(Result,0)
Result = (SNS!="") ? MIFO_ExtractSection(Result,sn,Stream,Debug) : Result
}
} else { (Debug) ? RT_DebugF("*** Section '%s' : Stream #%d Does NOT Exist (StreamCount=%d)",sn,OrgStream,Count,name=myName) : NOP }
""")
return Result
}

######
###### Extract Section by MIFO_ lib. (Full, Raw, by Default)
######

Function MIFO_Section(String Fn,String Section,int "Stream",Bool "Full",Bool "Raw",Bool "Debug",String "myName") {
/*
Section/Stream extracted via MIFO_ lib.
Can use Section = "General", "Video", "Audio", "Text", "Image", "Menu".
Stream (Default 1), 0 or 1 == first stream, or 2 -> Stream Count.
Full (default True), True extracts all MediaInfo Section/Stream data (not just a subset).
Raw (default True) to inspect real Parameter names that you can use to find an Item, eg shows "DisplayAspectRatio" instead of
"Display Aspect Ratio".
When Raw=True, can later use MIFO_ExtractSectionItem() to extract individual items from an extracted section without multiple calls
to MediaInfo ie avoid multiple scans of multimedia file (for each item extracted).
To extract entire MediaInfo data, call MIFO_Get() with Section, Parameter, and Template ALL empty strings (""), then can use
MIFO_ExtractSection() to extract individual Sections and from those sections extract individual data items.
*/
myName=Default(myName,"MIFO_Raw: ") Stream=Default(Stream,1) Full=Default(Full,True) Raw=Default(Raw,True)
sn = MIFO_CheckSection(Section) Assert(sn.IsString && sn!="",RT_String("%sBad Section('%s')",myName,Section))
Return MIFO_Get(Fn,sn,Stream,"","","",Full,Raw,Debug,myName)
}

Function MIFO_General(String Fn,int "Stream",Bool "Full",Bool "Raw",Bool "Debug")
{Return Mifo_Section(Fn,"General",stream,Full,Raw,Debug,"MIFO_General: ")}

Function MIFO_Video(String Fn,int "Stream",Bool "Full",Bool "Raw",Bool "Debug")
{Return Mifo_Section(Fn,"Video" ,stream,Full,Raw,Debug,"MIFO_Video: ")}

Function MIFO_Audio(String Fn,int "Stream",Bool "Full",Bool "Raw",Bool "Debug")
{Return Mifo_Section(Fn,"Audio" ,stream,Full,Raw,Debug,"MIFO_Audio: ")}

Function MIFO_Text(String Fn,int "Stream",Bool "Full",Bool "Raw",Bool "Debug")
{Return Mifo_Section(Fn,"Text" ,stream,Full,Raw,Debug,"MIFO_Text: ")}

Function MIFO_Image(String Fn,int "Stream",Bool "Full",Bool "Raw",Bool "Debug")
{Return Mifo_Section(Fn,"Image" ,stream,Full,Raw,Debug,"MIFO_Image: ")}

Function MIFO_Menu(String Fn,int "Stream",Bool "Full",Bool "Raw",Bool "Debug")
{Return Mifo_Section(Fn,"Menu" ,stream,Full,Raw,Debug,"MIFO_Menu: ")}

########################
########################
########################
###### Extract via MediaInfo Template search. : DEFAULT RAW for a Template search is False ie cooked..
########################
########################
########################

Function MIFO_TemplateString(String Fn,String "Section",int "Stream",String "Template",Bool "Raw",Bool "Debug",String "myName") {
/*
Do search via MediaInfo Template String search.
Can use Section = "General", "Video", "Audio", "Text", "Image", "Menu" where the section name will be used as argument to Inform and must
not appear again in the Template.
If Section name ="", then explicit section names must be used in the Template String eg "Video;%DisplayApectRatio%" for Video section item.
From CLI_Help.Doc included with MediaInfo: "the template option may only be used for the output of one section", eg cannot have both
Video and Audio items.
NOTE, Contents of Template String are not examined/changed in any way and are Case Significant.
Example, where Section == "Video", TemplateString = "width is: %Width% Height is: %Height%"
where Section == "" TemplateString = "Video; width is: %Width% Height is: %Height%"
Note, Raw defaults False, (Unlike MIFO_Get and MIFO_Item which default True). By default we return 'Cooked' results here.
*/
myName=Default(myName,"MIFO_TemplateString: ") Section=Default(Section,"") Stream=Default(Stream,1) Template=Default(Template,"")
Raw=Default(Raw,False) # Cooked Results.
sn = MIFO_CheckSection(Section) Assert(sn.IsString,RT_String("%sBad Section('%s')",myName,Section))
Assert(Template!="",RT_String("%sEmpty Template",myName))
Return MIFO_Get(Fn,Section,Stream,"",Template,"",True,Raw,Debug,myName)
}

######
######
######

Function MIFO_TemplateFile(String Fn,String "Section",int "Stream",String "Template",Bool "Raw",Bool "Debug",String "myName") {
/*
Do search via MediaInfo Template search.
Can use Section = "General", "Video", "Audio", "Text", "Image", "Menu" where the section name will be used as argument to Inform and must
not appear again in the Template.
If Section name ="", then explicit section names must be used in the Template eg "Video;%DisplayApectRatio%" for Video section item.
NOTE, Contents of Template file are not examined/changed in any way and are Case Significant.
NOTE, Seems to work better if Section given as "" and explicit Section names given in TemplateFile. See MediaInfo CLI_Help.Doc.
Example_Template.txt supplied in this zip, intended for use with Section="".
Note, Raw defaults False, (Unlike MIFO_Get and MIFO_Item which default True). By default return we 'Cooked' results here.
*/
myName=Default(myName,"MIFO_TemplateFile: ") Section=Default(Section,"") Stream=Default(Stream,1) Template=Default(Template,"")
Raw=Default(Raw,False) sn = MIFO_CheckSection(Section) Assert(sn.IsString,RT_String("%sBad Section('%s')",myName,Section))
Assert(Template!="",RT_String("%sEmpty Template",myName))
Template=RT_GetFullPathName(Template)
Assert(Exist(Template),RT_String("%s Template %s Does not exist",myName,Template))
Return MIFO_Get(Fn,Section,Stream,"","",Template,False,Raw,Debug,myName)
}

######
### Extract single Parameter Item via MediaInfo search. : DEFAULT RAW for a Item searche is TRUE (opposite Template searches).
######

Function MIFO_Item(String Fn,String Section,int "Stream",String "Parameter",Bool "Raw",Bool "Debug",String "myName") {
# Get Parameter item using MediaInfo built in Parameter search. Paramter should be Without surrounding Percent symbols (%)
# eg 'DisplayAspectRatio'.
# Can use Section = "General", "Video", "Audio", "Text", "Image", "Menu".
# NOTE, Section should be the section containing the required parameter, eg "Video" if looking for Parameter "DisplayAspectRatio".
# Stream Default 1, 0 or 1 == first stream, or 2 -> Stream Count.
# NOTE, Parameter IS case significant.
# NOTE, Raw (default true) returns 'uncooked' data, if False may return different data, eg
# Where Section = "General" and Parameter = "Text_Language_List", may return "da / en" and if Raw=False "Danish / English" may be returned
# (eg VOB IFO file).
# Here, Raw Default TRUE, is opposite to the MediaInfo Template search functions as it is probably of most use where getting real time status
# info during some kind of auto source filter selection, rather than for display in some verbose form (where Template function may be preferred).
myName=Default(myName,"MIFO_Item: ") Stream=Default(Stream,1) Parameter=Default(Parameter,"")
sn = MIFO_CheckSection(Section) Assert(sn.IsString && sn!="",RT_String("%sBad Section('%s')",myName,Section))
Assert(Parameter!="",RT_String("%sEmpty Parameter",myName))
Return MIFO_Get(Fn,Section,Stream,Parameter,"","",false,Raw,Debug,myName)
}

Function MIFO_GeneralItem(String Fn,Int "Stream",String "Parameter",Bool "Raw",Bool "Debug")
{Return MIFO_Item(Fn,"General",stream,Parameter,Raw,Debug,"MIFO_GeneralItem: ")}

Function MIFO_VideoItem(String Fn ,Int "Stream",String "Parameter",Bool "Raw",Bool "Debug")
{Return MIFO_Item(Fn,"Video" ,stream,Parameter,Raw,Debug,"MIFO_VideoItem: ")}

Function MIFO_AudioItem(String Fn ,Int "Stream",String "Parameter",Bool "Raw",Bool "Debug")
{Return MIFO_Item(Fn,"Audio" ,stream,Parameter,Raw,Debug,"MIFO_AudioItem: ")}

Function MIFO_TextItem(String Fn ,Int "Stream",String "Parameter",Bool "Raw",Bool "Debug")
{Return MIFO_Item(Fn,"Text" ,stream,Parameter,Raw,Debug,"MIFO_TextItem: ")}

Function MIFO_ImageItem(String Fn ,Int "Stream",String "Parameter",Bool "Raw",Bool "Debug")
{Return MIFO_Item(Fn,"Image" ,stream,Parameter,Raw,Debug,"MIFO_ImageItem: ")}
Function MIFO_MenuItem(String Fn ,Int "Stream",String "Parameter",Bool "Raw",Bool "Debug")
{Return MIFO_Item(Fn,"Menu" ,stream,Parameter,Raw,Debug,"MIFO_MenuItem: ")}




EDIT: Bugfix Addition marked above in blue.

StainlessS
5th March 2016, 00:10
Part #3


####################################
########## DEMO FUNCTIONS ##########
####################################

###### # Demo individual purpose functions (in this case for stream in Section 'General') Below all returning Type Int.
Function MI_VideoCount(String Fn,Bool "Debug") {Return RT_NumberValue(MIFO_GeneralItem(Fn,0,"VideoCount",Debug=Debug))}
Function MI_AudioCount(String Fn,Bool "Debug") {Return RT_NumberValue(MIFO_GeneralItem(Fn,0,"AudioCount",Debug=Debug))}
Function MI_TextCount(String Fn,Bool "Debug") {Return RT_NumberValue(MIFO_GeneralItem(Fn,0,"TextCount",Debug=Debug))}
Function MI_ImageCount(String Fn,Bool "Debug") {Return RT_NumberValue(MIFO_GeneralItem(Fn,0,"ImageCount",Debug=Debug))}
Function MI_MenuCount(String Fn,Bool "Debug") {Return RT_NumberValue(MIFO_GeneralItem(Fn,0,"MenuCount",Debug=Debug))}

###### Demo individual purpose funcs (in this case for stream in Section 'Video')
###### Below return type string to differentiate between "" & 0.
###### Below default to Raw mode, (for some things Raw and Cooked may be same)

Function MI_Video_DAR(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg '1.778'
{Return MIFO_VideoItem(Fn,Stream,"DisplayAspectRatio",Raw,Debug)}

Function MI_Video_CompressionMode(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "Lossless"/"Lossy"
{Return MIFO_VideoItem(Fn,Stream,"Compression_Mode",Raw,Debug)}

Function MI_Video_ColorSpace(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "YUV"
{Return MIFO_VideoItem(Fn,Stream,"ColorSpace",Raw,Debug)}

Function MI_Video_Width(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "720"
{Return MIFO_VideoItem(Fn,Stream,"Width",Raw,Debug)}

Function MI_Video_Height(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "576"
{Return MIFO_VideoItem(Fn,Stream,"Height",Raw,Debug)}

Function MI_Video_FrameRate(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "25.000"
{Return MIFO_VideoItem(Fn,Stream,"FrameRate",Raw,Debug)}

Function MI_Video_BitDepth(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "8"
{Return MIFO_VideoItem(Fn,Stream,"BitDepth",Raw,Debug)}

Function MI_Video_ScanType(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "Progressive"
{Return MIFO_VideoItem(Fn,Stream,"ScanType",Raw,Debug)}

Function MI_Video_ScanOrder(String Fn,Int "Stream",Bool "Raw",Bool "Debug") # eg "TFF"
{Return MIFO_VideoItem(Fn,Stream,"ScanOrder",Raw,Debug)}

StainlessS
10th March 2016, 14:33
Post 4,

MIFO_Client.avs (demo)


Import("MIFO_Library.avsi") # If not in Plugins Dir

###
# GET DEBUGVIEW to see output, here:- https://technet.microsoft.com/en-us/sysinternals/debugview.aspx
###

#Fn="I.AVI"
#Fn="I.FLV"
#Fn="I.MP4"
FN = "VTS_01_1.VOB"
#FN = "VTS_01_0.IFO"

DEBUG=False # False show results only : True = FULL DEBUG

TEMPLATESTRING=
\ "Pixel Aspect Ratio = ... : %PixelAspectRatio%\r\n" +
\ "Display Aspect Ratio = . : %DisplayAspectRatio%\r\n" +
\ "BitDepth = ............. : %BitDepth%\r\n" +
\ "ScanType = ............. : %ScanType%\r\n" +
\ "ScanOrder = ............ : %ScanOrder%\r\n" +
\ "Compression Mode = ..... : %Compression_Mode%\r\n" +
\ "Delay = ................ : %Delay%\r\n"

TEMPLATEFILE ="Example_TemplateFile.txt"

########
# Uncomment something below
########

S = MIFO_Version(Debug=DEBUG) # MediaInfo Version Number
# S = MIFO_StreamCount(Fn,"Audio",Debug=DEBUG) # Query number of Audio Streams
# S = MIFO_VideoItem(Fn,1,Parameter="DisplayAspectRatio",Debug=DEBUG) # Display Aspect Ratio of first Video stream
# S = MIFO_Item(Fn,"Video",1,Parameter="DisplayAspectRatio",Debug=DEBUG) # Display Aspect Ratio of first Video stream

# S = MIFO_TemplateString(Fn,"Video",Template=TEMPLATESTRING,Debug=DEBUG) # TemplateString Search Cooked
# S = MIFO_TemplateFile(Fn,Template=TEMPLATEFILE,Debug=DEBUG) # TemplateFile Search Cooked

# S = MIFO_General(Fn,Full=True,Raw=True,Debug=DEBUG) # Extract Full General Section Raw Parameters

# S = MIFO_Video(Fn,Full=False,Raw=False,Debug=DEBUG) # Extract Normal Video Section Cooked Parameters
# S = MIFO_Video(Fn,Full=True,Raw=False,Debug=DEBUG) # Extract Full Video Section Cooked Parameters
# S = MIFO_Video(Fn,Full=False,Raw=True,Debug=DEBUG) # Extract Normal Video Section Raw Parameters
# S = MIFO_Video(Fn,Full=True,Raw=True,Debug=DEBUG) # Extract Full Video Section Raw Parameters

# S = MIFO_Audio(Fn,Full=True,Raw=True,Debug=DEBUG) # Extract Full Audio Section Raw Parameters
# S = MIFO_Text(Fn,Full=True,Raw=True,Debug=DEBUG) # Extract Full Text Section Raw Parameters
# S = MIFO_Image(Fn,Full=True,Raw=True,Debug=DEBUG) # Extract Full Image Section Raw Parameters
# S = MIFO_Meu(Fn,Full=True,Raw=True,Debug=DEBUG) # Extract Full Menu Section Raw Parameters


#######################
## Uncomment Below 4 lines TOGETHER. Extract Multiple items from full search Raw Info
## [We only extrat one item below: MIFO_Video(Fn) could replace lines 2 & 3].
##
#ITEM_1 = "Format_Settings_Matrix_Data" # Item to find in full search info, Video Section of eg VOB.
#ALLINFO = MIFO_Get(Fn,"",Full=True,Raw=True,Debug=DEBUG) # Extract FULL RAW Info [MIFO_Video(Fn) would be simpler]
#VIDINFO = MIFO_ExtractSection(ALLINFO,"Video",Debug=DEBUG) # Extract Video Info [Same as MIFO_Video(Fn) or MIFO_Section(Fn,"Video")]
#S = MIFO_ExtractSectionItem(VIDINFO,ITEM_1,Pair=True,Debug=Debug) # Extract ITEM_1 as string Pair (Pair=False for data alone)
#######################

### Demo Functions
# S = MI_VideoCount(Fn,Debug=DEBUG) # These return Type Int.
# S = MI_AudioCount(Fn,Debug=DEBUG)
# S = MI_TextCount(Fn,Debug=DEBUG)
# S = MI_ImageCount(Fn,Debug=DEBUG)
# S = MI_MenuCount(Fn,Debug=DEBUG)


# S = MI_Video_DAR(FN,Debug=DEBUG) # These return Type String.
# S = MI_Video_CompressionMode(FN,Debug=DEBUG)
# S = MI_Video_Width(FN,Debug=DEBUG)
# S = MI_Video_Height(FN,Debug=DEBUG)
# S = MI_Video_FrameRate(FN,Debug=DEBUG)
# S = MI_Video_BitDepth(FN,Debug=DEBUG)
# S = MI_Video_ScanType(FN,Debug=DEBUG)
# S = MI_Video_ScanOrder(FN,Debug=DEBUG)

#S = MIFO_Get(Fn,"",Full=True,Raw=True,Debug=DEBUG)SCROLL=True # Extract Entire Info, Full Raw Parameters

#######
#######
#######

RT_DebugF("%s",String(S),name="TEST_RESULT: ") # See Results in DebugView

#######
(!RT_VarExist("SCROLL"))
\ ? Messageclip("DONE ")
\ :BlankClip(Length=RT_TxtQueryLines(S)*20).ScriptClip("""RT_Subtitle("%s",S,align=1,y=height-current_frame,expx=true,expy=true)""")

StainlessS
10th March 2016, 14:36
Above scripts updated to v1.0.

You will need the zip from Mediafire (below in sig) to get the Example_TemplateFile.txt file.


EDIT: Dear me !!!, had one helluva a time posting above, managed to post stuff multiple times, windows above kept jumping all
over the place and I kept losing where I was [Firefox probably]. Sorted now (I hope).

Cheers Grouchy :)

EDIT:
Contents of "Example_Template.txt" (in zip)
In pseudo Avisynth speak, where '+' and '\' Means concatentate, and Chr(10) means a real end of line.
All double quotes ellimiated. (Final result 4 lines of text in file)

"General;" +
\ "File Name...............: %CompleteName%\r\n" +
\ "Runtime.................: %Duration/String%\r\n" +
\ "File Size...............: %FileSize/String4%\r\n" +
\ "Format..................: %Format%\r\n" +
\ "Video Bitrate...........: %OverallBitRate/String%\r\n" +
\ Chr(10) +
\ "Video;" +
\ "Video Codec.............: %Format% %Format_Profile%\r\n" +
\ "Display Aspect Ratio....: %DisplayAspectRatio/String%\r\n" +
\ "Resolution..............: %Width%x%Height/String%\r\n" +
\ "Frame Rate..............: %FrameRate/String%\r\n" +
\ Chr(10) +
\ "Audio;" +
\ "Audio ID................: %ID/String%\r\n" +
\ "Audio Codec.............: %Format% %Format_Profile%\r\n" +
\ "Channels................: %Channel(s)/String% (%ChannelPositions%)\r\n" +
\ "Sampling Rate...........: %SamplingRate/String%\r\n" +
\ "$if(%Language%,Language................: %Language%\r\n)" +
\ "Bitrate.................: %BitRate/String%\r\n" +
\ Chr(10) +
\ "Text;" +
\ "Subs ID.................: %ID/String%\r\n" +
\ "Format/Info.............: %Format/Info%\r\n" +
\ Chr(10)



Might produce this on a VOB using MIFO_TemplateFile()

File Name...............: D:\___MIFO LIB\MIFO_Lib-v1.0-20160309\VTS_01_1.VOB
Runtime.................: 8mn 5s
File Size...............: 1 024.0 MiB
Format..................: MPEG-PS
Video Bitrate...........: 17.7 Mbps
Video Codec.............: MPEG Video Main@Main
Display Aspect Ratio....: 16:9
Resolution..............: 720x576 pixels
Frame Rate..............: 25.000 fps
Audio ID................: 189 (0xBD)-128 (0x80)
Audio Codec.............: AC-3
Channels................: 6 channels (Front: L C R, Side: L R, LFE)
Sampling Rate...........: 48.0 KHz
Bitrate.................: 448 Kbps
Subs ID.................: 189 (0xBD)-32 (0x20)
Format/Info.............: Run-length encoding
Subs ID.................: 189 (0xBD)-33 (0x21)
Format/Info.............: Run-length encoding
Subs ID.................: 189 (0xBD)-34 (0x22)
Format/Info.............: Run-length encoding
Subs ID.................: 189 (0xBD)-35 (0x23)
Format/Info.............: Run-length encoding
Subs ID.................: 189 (0xBD)-36 (0x24)
Format/Info.............: Run-length encoding
Subs ID.................: 189 (0xBD)-37 (0x25)
Format/Info.............: Run-length encoding
Subs ID.................: 189 (0xBD)-38 (0x26)
Format/Info.............: Run-length encoding


EDIT: Eg 'Text;' seems to mean all subs in a template, and 'Text #1;' would mean a single stream.
Also note the $if(%Language%,...) condition in Template, VOB did not specify Language for Audio and so ... is eliminated.

StainlessS
11th March 2016, 16:44
Oops, bug fixed v1.01, see 1st post.

Added Raw to Demo functions, and fixed calling eg with Debug arg as Raw parameter to MIFO_VideoItem.
Reformatted for better display on D9.

(Windows are still jumping about when trying to edit, must be Firefox problem).

EDIT: Post #2 has a bug fix addition marked in blue. I shall it add to next update.
Would not be a problem if Template File in current directory or if full path specified for TemplateFile.

EDIT: This addition, addition marked in BLUE

Function MIFO_TemplateFile(String Fn,String "Section",int "Stream",String "Template",Bool "Raw",Bool "Debug",String "myName") {
/*
Do search via MediaInfo Template search.
Can use Section = "General", "Video", "Audio", "Text", "Image", "Menu" where the section name will be used as argument to Inform and must
not appear again in the Template.
If Section name ="", then explicit section names must be used in the Template eg "Video;%DisplayApectRatio%" for Video section item.
NOTE, Contents of Template file are not examined/changed in any way and are Case Significant.
NOTE, Seems to work better if Section given as "" and explicit Section names given in TemplateFile. See MediaInfo CLI_Help.Doc.
Example_Template.txt supplied in this zip, intended for use with Section="".
Note, Raw defaults False, (Unlike MIFO_Get and MIFO_Item which default True). By default return we 'Cooked' results here.
*/
myName=Default(myName,"MIFO_TemplateFile: ") Section=Default(Section,"") Stream=Default(Stream,1) Template=Default(Template,"")
Raw=Default(Raw,False) sn = MIFO_CheckSection(Section) Assert(sn.IsString,RT_String("%sBad Section('%s')",myName,Section))
Assert(Template!="",RT_String("%sEmpty Template",myName))
Template=RT_GetFullPathName(Template)
Assert(Exist(Template),RT_String("%s Template %s Does not exist",myName,Template))
Return MIFO_Get(Fn,Section,Stream,"","",Template,False,Raw,Debug,myName)
}

StainlessS
13th March 2016, 16:58
MediaInfo cannot extract any info from d2v files, however this can extract a little bit.


# D2v_InfoTxt.avsi

Function D2v_InfoTxt(String Fn) {
/*
Returns Info extracted from d2v file as multiline String, Chr(10) separated lines.
nLines = RT_TxtQueryLines(Txt) to get total line count.
Use eg Str = RT_TxtGetLine(Txt,ZeroRelLineNumber) : and : num = Value(RT_TxtGetLine(Txt,ZeroRelLinNumber)) to get numbers.
Line Contents:-
0 ) Mpeg Type (1 or 2)
1 ) Pixel Aspect Ratio eg 1.067
2 ) Display Aspect Ratio eg 1.778
3 ) Frame Width eg 720
4 ) Frame Height eg 576
5 ) Field Operation, 0 to 2, (0=Honour pulldown flags, 1=Force Film, 2=Ignore Pulldown Flags)
6 ) FrameRate eg 25.000
7 ) Film Content eg 0.0 (0.0 for pure Video. 100.0 for pure Film)
8 ) IFO FileName (if VOB source and IFO exists). Eg for "D:\Path\VTS_01_1.VOB" would be "D:\Path\VTS_01_0.IFO" (otherwise "").
9 ) Line 9 to nLines -1 : Source file names. Number of source files = nLines - 9.
*/
myName="D2v_InfoTxt: " Result=""
GScript("""
Function d2v_FindItem(String s,String Find) {S=RT_TxtGetLine(s)Bingo=RT_FindStr(S,Find)Return(Bingo>0)?MidStr(S,Bingo+StrLen(Find)):""}
Function d2v_Find(String Fn,Int StartLine,Int Lines,String Find) {
Bingo = RT_FileFindStr(Fn,Find,Sig=False,start=StartLine,lines=Lines)
Return (Bingo >= 0) ? d2v_FindItem(RT_ReadTxtFromFile(Fn,Start=Bingo,Lines=1),Find) : ""
}
Assert(Fn!="",RT_String("%sEmpty FileName",myName)) Fn=RT_GetFullPathName(Fn) Lines = RT_FileQueryLines(Fn)
INVALID=RT_String("%s Invalid d2v file",myName) Assert(Lines>=19,INVALID)
s=RT_TxtGetLine(RT_ReadTxtFromFile(Fn,lines=1,start=0)) Assert(S=="DGIndexProjectFile16",INVALID)
Files=RT_NumberValue(RT_ReadTxtFromFile(Fn,lines=1,start=1)) Assert(Files>=1,RT_String("%s d2v file missing source files",myName))
FILES_TXT = RT_ReadTxtFromFile(Fn,Start=2,Lines=Files)
StartLine=Files + 3
s = d2v_Find(Fn,StartLine,20,"MPEG_Type=") MPEG2 = RT_NumberValue(s)
s = d2v_Find(Fn,StartLine,20,"Picture_Size=")
FrameWidth=RT_NumberValue(S)
FrameHeight=RT_NumberValue(d2v_FindItem(s,"x"))
S = d2v_Find(Fn,StartLine,20,"Aspect_Ratio=")
FNDS=RT_String("16:9,625\n16:9,525\n4:3,625\n4:3,525") # DGIndex version of MPEG1 PAR (y/x)
REPS=RT_String("0.7031\n0.8437\n0.9375\n1.1250") # Actual numbers replacing (MPEG1 PAR=y/x)
S=RT_StrReplaceMulti(S,FNDS,REPS) # Convert MPEG1 625(PAL),525(NTSC) Ratio to number
FDAR_N=Value(S) # May be Float
COLON=RT_FindStr(S,":") # Ratio ?
FDAR_D=(COLON==0) ? 1 : RT_NumberValue(S,Pos=COLON+1)
Assert(FDAR_N>0 && FDAR_D>0,myName+"Error Reading d2v 'Aspect Ratio' (N="+String(FDAR_N)+",D="+String(FDAR_D)+")")
# Get Frame DAR from:- 1:1 SAR, or MPEG2 DAR, or MPEG1 PAR(y/x)
Frame_Dar=(FDAR_N==1 && FDAR_D==1) ? Float(FrameWidth)/FrameHeight : (COLON!=0) ? Float(FDAR_N)/FDAR_D : (Float(FrameWidth)/FrameHeight)/FDAR_N
SAR = Frame_DAR * Float(FrameHeight) / Float(FrameWidth)
Field_Op = RT_NumberValue(d2v_Find(Fn,StartLine,20,"Field_Operation="))
FrameRate = RT_NumberValue(d2v_Find(Fn,StartLine,20,"Frame_Rate="))/1000.0
Fin = d2v_FindItem(RT_ReadTxtFromFile(Fn,Start=Lines - 1)," ")
FilmPerc=Value(Fin) FilmPerc= (RT_FindStr(Fin,"VIDEO",Sig=False)!=0) ? 100.0 - FilmPerc : FilmPerc
Result = RT_String("%d\n%.3f\n%.3f\n%d\n%d\n%d\n%.3f\n%.2f\n",MPEG2,SAR,Frame_Dar,FrameWidth,FrameHeight,Field_Op,FrameRate,FilmPerc)
IFO="" Source1=RT_TxtGetLine(FILES_TXT,0) Ext=RT_GetFileExtension(Source1)
if(Ext==".VOB") {S=RT_FilenameSplit(Source1,Get=7) S=LeftStr(S,StrLen(S)-1)+"0.IFO" IFO = Exist(S) ? S : ""}
Result=RT_TxtAddStr(Result,IFO,FILES_TXT)
""")
Return Result
}


Client

S = D2v_InfoTxt("VTS_01_1.d2v")
BlankClip.RT_Subtitle("%s",S)


Might extract something like this


00000048 15:51:14 RT_DebugF: 2
00000049 15:51:14 RT_DebugF: 1.422
00000050 15:51:14 RT_DebugF: 1.778
00000051 15:51:14 RT_DebugF: 720
00000052 15:51:14 RT_DebugF: 576
00000053 15:51:14 RT_DebugF: 0
00000054 15:51:14 RT_DebugF: 25.000
00000055 15:51:14 RT_DebugF: 0.00
00000056 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_0.IFO
00000057 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_1.VOB
00000058 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_2.VOB
00000059 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_3.VOB
00000060 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_4.VOB
00000061 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_5.VOB
00000062 15:51:14 RT_DebugF: D:\___MIFO LIB\VTS_01_6.VOB


or this

00000073 16:04:20 RT_DebugF: 2
00000074 16:04:20 RT_DebugF: 1.185
00000075 16:04:20 RT_DebugF: 1.778
00000076 16:04:20 RT_DebugF: 720
00000077 16:04:20 RT_DebugF: 480
00000078 16:04:20 RT_DebugF: 0
00000079 16:04:20 RT_DebugF: 29.970
00000080 16:04:20 RT_DebugF: 0.00
00000081 16:04:20 RT_DebugF: D:\EARL_1\VIDEO_TS\VTS_04_0.IFO
00000082 16:04:20 RT_DebugF: D:\EARL_1\VIDEO_TS\VTS_04_1.VOB


or this where NTSC FILM and saved project in DGIndex with Honour pulldown flags
(where mpeg2 and NTSC [480] and 29.97 and honour pulldown flags and film=100%, detect use tfm("vid.d2v") and TDecimate(mode=0))

00000010 16:34:54 RT_DebugF: 2
00000011 16:34:54 RT_DebugF: 1.185
00000012 16:34:54 RT_DebugF: 1.778
00000013 16:34:54 RT_DebugF: 720
00000014 16:34:54 RT_DebugF: 480
00000015 16:34:54 RT_DebugF: 0
00000016 16:34:54 RT_DebugF: 29.970
00000017 16:34:54 RT_DebugF: 100.00
00000018 16:34:54 RT_DebugF:
00000019 16:34:54 RT_DebugF: D:\LOTR_NTSC\FORCEFILM-ReturnOfTheKing_NTSC.VOB