View Full Version : DGIndex Batcher v1.18 (17 Apr 2018)
videoh
28th January 2021, 22:57
Nothing I do crashes DGIndex standalone. If your app is doing stupid things, don't try to put it on me.
StainlessS
28th January 2021, 23:00
Well if your happy, then so am I, we got it fixed for us.
StainlessS
28th January 2021, 23:53
Simple proof of problem,
Full Autoit script, no additional script/libraries involved.
Opt('MustDeclareVars', 1) ; require pre-declared vars
Dim Const $WinTitle = 'Information' ; Information window title
Dim Const $WinTxt = 'Video' ; 2nd optional identifier for Information Window [some text on Information Window)
Dim Const $Timeout = 0 ; FOREVER
DO
Dim $Hand = WinWait($WinTitle, $WinTxt, $Timeout) ; Wait for $WinTitle to appear
if $Hand <> 0 Then
WinClose($WinTitle, $WinTxt) ; Window exists, close it
ExitLoop ; Done, exit loop and then exit program
Endif
Until 1 ; # EDIT: I meant this to be until 0(forever), but it still works . [as if DO and Until 1, and ExitLoop , all missing]
Exit 0 ; End Program
Execute the DGI_BUGTEST.exe,
it will wait for DGIndex to put up Information window [needs to be Preview window for bug to exhibit]
It will immediately close the info window.
You then need stop the preview.
Do full index scan and bang !!! [may require several tries to produce bug result.
It cannot be any more simple than this.
Script and Exe on SendSpace as DGI_BugTest.7z
EDIT: OK, I fixed above prob, and re-upped to SendSapce.
Now as this
Opt('MustDeclareVars', 1) ; require pre-declared vars
Dim Const $WinTitle = 'Information' ; Information window title
Dim Const $WinTxt = 'Video' ; 2nd optional identifier for Information Window [some text on Information Window)
Dim Const $Timeout = 0 ; FOREVER
Dim $Hand = WinWait($WinTitle, $WinTxt, $Timeout) ; Wait for $WinTitle to appear
if $Hand <> 0 Then
WinClose($WinTitle, $WinTxt) ; Window exists, close it
Endif
Exit 0 ; End Program
EDIT: Original batcher script has several Sleep(SomeAmountOfTime) calls in it, above script does no sleeps()'s and so may exhibit problem more often, or even always.
The Script/exe exits straight away when Info window closed, so need to be re-executed to retry.
EDIT: I've just tried with DGIndex v1.57, (only tried once) and no crash. Not tried with v1.58 DGIndex, not sure if I've got it (I got DGDecode v1.58, not DGIndex)
EDIT:
Or even (seems to work every time, as does above)
if WinWait('Information', 'Video', 0) <> 0 Then WinClose('Information', 'Video')
Exit 0
It probably dont matter too much, is unlikely to be much (if ever) of a prob to human user.
StainlessS
29th January 2021, 01:41
DGIndex_Batcher() v1.21, see 1st post.
v1.18, 13 Mar 2018, Recompile AutoIt v3.3.14.4
v1.19, 13 July 2018, Recompile AutoIt v3.3.14.5
v1.20, 24 Jan 2021, Some fixes.
v1.21, 28 Jan 2021, Close Preview window before Information Window, avoid DGIndex v2.0 Not Responding when Full Indexing.
videoh
29th January 2021, 03:21
it will wait for DGIndex to put up Information window [needs to be Preview window for bug to exhibit]
It will immediately close the info window.
You then need stop the preview.
Do full index scan and bang !!! [may require several tries to produce bug result.
It cannot be any more simple than this. I opened DGIndex, loaded a VOB, started preview, closed Info dialog, stopped the preview, and then did save project. It does not crash.
StainlessS
29th January 2021, 04:17
OK, [when you say closed Info Dialog, assume you mean via the DGI_BUGTEST.7z exe]
Dont know if relevant but as Danette was doing MPEG2's I only ever tried on those, not VOBS. [well maybe MPG1, dont know, maybe Danette can comment].
as posted it probably dont matter for human user.
It probably dont matter too much, is unlikely to be much (if ever) of a prob to human user.
I'm happy, we dont have any problems.
videoh
29th January 2021, 04:33
Just doing it with DGIndex, not the AutoIt stuff.
StainlessS
29th January 2021, 05:01
DGIndex_Batcher v1.22, update see 1st post.
v1.18, 13 Mar 2018, Recompile AutoIt v3.3.14.4
v1.19, 13 July 2018, Recompile AutoIt v3.3.14.5
v1.20, 24 Jan 2021, Some fixes.
v1.21, 28 Jan 2021, Close Preview window before Information Window, avoid DGIndex v2.0 Not Responding when Full Indexing.
v1.22, 29 Jan 2021, Cockup in v1.21, had left DGIndex bug testing code uncommented, bug still existed. Fixed.
videoh
29th January 2021, 14:01
had left DGIndex bug testing code uncommented, bug still existed
You have not demonstrated any DGIndex bug, and if you want to keep up with that well I can fsck with you too. Game on!
StainlessS
29th January 2021, 15:08
What is it with you ???????
Apparently you cant make a horse drink, not even when you push him into the water.
I really dont care, anymore, if you're happy then who am I to disturb your oblivion.
EDIT: We are finished here.
Danette
29th January 2021, 16:30
I’ve now run v1.22 on five different TV series (number of episodes per series ranges from 24-39) and, yes: these are all MPEG’s from NTSC DVD’s (ripped by MakeMKV). All runs completed with no problems.
In fact, whereas DGIndex Batcher v1.20 was 5% faster vs. v1.18, v1.22 is coming in at nearly 40% faster than v1.18. So, either DGIndex Batcher 1.22 is operating much more efficiently than previous versions or it is now taking advantage of the reported efficiency increase in the new DGIndex version …maybe a little of both.
StainlessS
29th January 2021, 17:02
Any speedup is probably a bit of both.
I made some changes in the common batcher source file, removed or shortened some delays and such.
Also, I don't remember how fast earlier DGIndex was [on mpgs] , but was actually surprised by its speed when processing mpeg2's. I usually only use it
nowadays for VOBs, even though the batcher was originally used [by me] mostly for mpg2 and mpg1 conversions, together with the MeGUI batcher thingy
for full automation. It surely goes like the clappers.
EDIT: Speed improvement of the batcher is probably only 1 or 2 seconds faster at best [per file], so it really
depends upon duration of the video how much percent time spent is reduced.
My tests files were 25 minutes each, and I guess about 8 seconds or so for the full indexing save Project file,
so reduction of a second or so could make a difference.
The GUI interaction of the batcher probably took longer than the actual indexing time. [just a guess, I ain't timed it].
videoh
29th January 2021, 17:13
or it is now taking advantage of the reported efficiency increase in the new DGIndex version …maybe a little of both. Don't discount the possibility that StainlessS is just a script kiddie who has no idea what he is doing, and blames others for his shortcomings.
Qaenos
2nd February 2021, 12:55
Just tried to download from both MediaFire and SendSpace and I got an error message on Microsoft Edge saying that I couldn't download either file because a virus has been detected. The file name was DGIndex_Batcher_v1.22_20210129.zip in both cases.
https://i.ibb.co/KKD7hz3/Screenshot-2021-02-02-065339.png (https://ibb.co/GH9kp3b)
StainlessS
2nd February 2021, 16:15
Post it on Virustotal, and then you'll see what other AV thinks.
Or here:- https://www.virustotal.com/gui/url/1195c065ed01a0acdd9b815599ca2fff849f697faa0ff778373ad39dc618fcdf/detection
0 out of 83 AV software thinks it is a problem, all give it a 'Clean' status.
I note that Windows Defender is not used on VirusTotal, perhaps there is a reason.
Also, maybe you should switch off PUPs [if there is an option for it, PUP = Potentially Unwanted Program],
I dont really use Defender, maybe someone else can advise where the switch is in W10 settings.
EDIT: I assume that Edge uses Defender style detection engine.
Maybe its the Edge SmartScreen thing, not defender, again, I dont use Edge. [Switch OFF SmartScreen]
EDIT: Or maybe try another browser.
Qaenos
3rd February 2021, 17:00
I just tried the mediafire and the sendspace downloads using Chrome and same thing - virus detected, failed download.
videoh
3rd February 2021, 17:05
I just downloaded from the sendspace link with Chrome without any issues.
StainlessS
3rd February 2021, 17:13
Here:- https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-smartscreen/microsoft-defender-smartscreen-overview
You will find link to
Detect and block potentially unwanted applications:- https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-antivirus/detect-block-potentially-unwanted-apps-microsoft-defender-antivirus
Maybe you can turn it [PUPs] off.
Also, give me a couple of minutes and I'll post a password protected 7z on SendSpace.
EDIT: I'm wondering if some malicious user has posted some bad report to SmartScreen [crazy/nasty people do exist].
EDIT: OK, posted on SendSpace:- https://www.sendspace.com/file/zqudoy
Qaenos
3rd February 2021, 18:02
StainlessS, thanks - I could really use this tool and I appreciate the help.
I just clicked the Sendspace link https://www.sendspace.com/file/zqudoy and it says 502 Bad Gateway.
StainlessS
3rd February 2021, 19:11
I think that bad gateway thing is a temp internet/server thing, retry it. Worked for me no problem.
Qaenos
3rd February 2021, 20:28
I downloaded the file, extracted it, clicked on the .exe and got an error message that it might contain a virus so it wouldn't let me open it.
StainlessS
3rd February 2021, 20:37
Well I guess you need to switch off PUPs in Windows Defender, I've no idea how to do that.
I'm guessing that its latest W10 H204.
You're not having much luck really, are you :)
EDIT:
The only version of W10 that I have at the moment, I removed Windows Defender from the ISO before setup [using NTLite],
and am now struggling because I cant switch off W10 Firewall, I seem to have disabled it being switch off [when removing Win Defender].
Am now trying again, but not sure where I went wrong.
Can someone who is familiar with W10 Defender, please assist Qaenos.
EDIT: You might be able to submit the file to M$, so they can examine and white list it.
StainlessS
3rd February 2021, 20:48
I've upped to SendSpace without UPX compression:- https://www.sendspace.com/file/uvngwx
Some AV software dont like UPX because it cant see inside it. [twice the size of original]
Qaenos
3rd February 2021, 21:07
I've upped to SendSpace without UPX compression:- https://www.sendspace.com/file/uvngwx
Some AV software dont like UPX because it cant see inside it. [twice the size of original]
Thanks - I appreciate all the effort, but I just tried the UPX-free .exe files and same thing - Windows won't let me run it because it thinks there might be a virus.
I really do want some way to perform DGIndex on a whole directory of .mkv files, but I don't think I'm willing to turn of Windows Defender to do it.
StainlessS
3rd February 2021, 21:24
Can someone who is familiar with W10 Defender, please assist Qaenos.
EDIT: You might be able to submit the file to M$, so they can examine and white list it.
If it is flagged as a PUP, then it dont mean virus, it means Potentially Unwanted, ie it dont know if you want it or not and is just being paranoid.
You need to get 'into' the WD setting and logs stuff and see what is happening.
Nothing more I can suggest sorry.
EDIT:
Add-an-exclusion-to-windows-security
https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c301afe13b26
EDIT
You can't. Microsoft doesn't maintain such a whitelist of files since their systems assume that software developers will sign their code using a code signing certificate.
The file submission process exists only to allow Microsoft to determine whether the detection for a file might be either a false positive or that the detection for actual malware is failing, it will not result in addition to any "safe list" since this doesn't exist.
The following links are also found at the page link provided above and explain this further.
https://www.microsoft.com/security/portal/mmpc/developer/resources.aspx
https://www.microsoft.com/security/portal/mmpc/developer/faq.aspx
Does Microsoft accept files for a known list or false positive prevention program?
No. We do not accept these requests from software developers. Signing your program’s files in a consistent manner, with a digital certificate issued by a trusted root authority, helps our research team quickly identify the source of a program and apply previously gained knowledge. In some cases this can result in your program being quickly added to the known list or, far less frequently, in adding your digital certificate to a list of trusted publishers.
So you will either need to set an exception manually as suggested by the second response above or explore the option of signing your code with a certificate, which is typically both costly and complex.
https://answers.microsoft.com/en-us/protect/forum/all/getting-my-program-added-to-windows-defender-safe/3b0b07fb-743f-4c85-a18c-43ca84e6c3f1
Again, nothing at all that I can do, main reason I want rid of Defender on my W10,
I've got a usable anti-virus, dont need no paranoid one.
StainlessS
3rd February 2021, 22:50
I really do want some way to perform DGIndex on a whole directory of .mkv files
I did not noticed the 'mkv' above, I dont think DGIndex supports mkv, so its no good to you anyway.
Danette
4th February 2021, 15:44
Interesting, I ran a long overdue update to my Bitdefender antivrius program and it, too, is detecting a virus in the new DGIndex Batcher. The message I get is that a trojan is involved: Trojan.GenericKD.45668852. The AV program removed it and DGindex Batcher ceased to function. I restored it and it works again.
StainlessS
4th February 2021, 15:54
If Qaenos did indeed want to proc DgIndex files [ie not MKV],
then he could always down the source code and AutoIt, and compile it,
and exclude defender thing from giving false +ve.
StainlessS
4th March 2021, 19:01
Thanks - I appreciate all the effort, but I just tried the UPX-free .exe files and same thing - Windows won't let me run it because it thinks there might be a virus.
I really do want some way to perform DGIndex on a whole directory of .mkv files, but I don't think I'm willing to turn of Windows Defender to do it.
Below will not help with MKV [DGIdex dont process MKV] but may at least allow use with appropriate files.
From Here [link originally posted by TheFluff]:- https://decentsecurity.com/#/holiday-tasks/
14.) Enable SmartScreen (Windows 8+)
This will check with Microsoft and warn users if they download+run any programs not commonly seen. This will prevent most infections downloaded from fake emails unless the user clicks through the stern warnings.
Start > type "SmartScreen" > click "Change SmartScreen Settings"
On the left, click "Change Windows SmartScreen Settings"
Select "Get administrator approval" (Windows 8) or "Warn before running an unrecognized app" (Windows 10) and hit Ok
Maybe it helps [allow admin approval rather than delete file]..
StainlessS
15th March 2021, 16:47
NOTE, DGMPGDec / DGIndex / DGDecode (Mpeg2Source) [x86 + x64, Avs + Vapoursynth] seem to have been updated recently , version I have is 2.0.0.4
here v2.0.0.5:- http://rationalqm.us/dgmpgdec/dgmpgdec.html
Danette
2nd May 2021, 23:39
New version has been working flawlessly!
Request/question:
In the log files, is there a way to have the field order identified? The line item is there, but is always absent the order.
StainlessS
3rd May 2021, 00:31
In the log files, is there a way to have the field order identified? The line item is there, but is always absent the order.
You mean in the output Avs file, not the log file ?
Below line in Template is wrong,
(DGI_Field_Order != "__Field_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
Should be
(DGI_Field_Order != "__Field"+"_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
Problem was, DGI_Field_Order is properly changed from "__Field_Order__" to "Top"
But later in script
(DGI_Field_Order != "__Field_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
Also got changed to
(DGI_Field_Order != "Top") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
So it thinks Infos not inserted.
Sorry :(
Danette
3rd May 2021, 01:16
You mean in the output Avs file, not the log file ?(
No, I mean the log file. I use much of the info in that log file, as generated by DGIndex Batcher, to make various determinations of how to handle videos. For example; I have numerous mpeg files that I am processing and some have TFF, while others have BFF. MediaInfo doesn’t capture, in their “Scan order” line, the order in many of these files for some reason. I was hoping that it was just an oversight in DGIndex Batcher
Below line in Template is wrong,
(DGI_Field_Order != "__Field_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
Should be
(DGI_Field_Order != "__Field"+"_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
Problem was, DGI_Field_Order is properly changed from "__Field_Order__" to "Top"
But later in script
(DGI_Field_Order != "__Field_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
Also got changed to
(DGI_Field_Order != "Top") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
So it thinks Infos not inserted.
Sorry :(
Does this mean that it can’t be done in DGIndex Batcher? When I run DGIndex, the field order info seems to be generated, but the log files generated by DGIndex Batcher are so much easier to use.
StainlessS
3rd May 2021, 01:51
The Log file is only for Batcher related problems like "*** WARNING ***, avs file is NOT overwritten".
Typical log file might be something like
5 Files Processed
5 Avs Files Created in target Folder
0 AVS Files moved to PROBLEM Folder
0 Files Skipped
The Field Order entries filled in by TEMPLATE avs are eg
DGI_Field_Order = "Top"
DGI_Stream_Type = "MPEG2 Program"
DGI_Profile = "main@main"
DGI_Frame_Size = "720x576"
DGI_Display_Size= "720x576"
DGI_Aspect_Ratio= "4:3 [2]"
DGI_Frame_Rate = "25.000000 fps"
DGI_Video_Type = "PAL"
DGI_Sequence = "Field/Frame"
DGI_Frame_Struct= "Frame"
DGI_Frame_Type = "Interlaced"
DGI_Colorimetry = "BT.470-2 B,G"
However, DGI_Field_Order is gotten by playing Preview in DGIndex for a few frames, and extracting the field order
from the DGIndex Information window, BUT, this info is possibly incorrect or not constant throughout the clip. [eg Illegal Field order transition].
DGIndex does not even write Field Order into the d2v file.
From d2v,
Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=4:3
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000 (25/1)
It is a good idea to always check Field Order, and also, just because it says Interlaced in VOB, dont mean that it is interlaced,
so you need to check that also. [and if it aint interlaced or NTSC soft telecine then field order is of little worth].
Danette
3rd May 2021, 02:35
Yes, my videos are nearly all NTSC and, nominally, interlaced (which is generally incorrect and, actually, telecined). I have found that, with some regularity, some older m2v's are identified, by DGIndex Batcher, as having illegal field order transition and then corrected.
The log files, generated by DGIndex Batcher, that I am referencing have these listings:
Frame Size: 720x480
Display Size: [not specified]
Aspect Ratio: 4:3 [2]
Frame Rate: 29.970030 fps
Video Type: NTSC
Frame Type: Interlaced
Coding Type: B
Colorimetry: BT.470-2 B,G*
Frame Structure: Frame
Field Order:
Coded Number: 4224
Playback Number: 368
Frame Repeats: 0
Field Repeats: 0
VOB ID:
Cell ID:
Bitrate:
Bitrate (Avg):
Bitrate (Max):
Timestamp:
Elapsed: 0:00:00
Remain: FINISH
FPS:
Info:
Note the absence of Filed Order identification.
StainlessS
3rd May 2021, 02:50
That looks to be the contents of DGIndex Information Window [not batcher],
are you saying the batcher writes that to some log file ?
If so, whats the file called, I aint used DGIndex_Batcher for some time, and I dont see anything that does that in the source.
videoh
3rd May 2021, 03:17
DGIndex writes the Info window contents to a log file when closed. If a save project is done without a previous play/preview, then the Field order is not populated. It's fixable but you'll have to make a request at the DG Tools forum.
StainlessS
3rd May 2021, 03:49
DGIndex writes the Info window contents to a log file when closed. If a save project is done without a previous play/preview, then the Field order is not populated. It's fixable but you'll have to make a request at the DG Tools forum.
Arh, thats what it is, when this [bottom] option is ticked [I forgot it did that]
https://i.postimg.cc/3NB6kM9g/DGIndex-Log.jpg (https://postimages.org/)
Thankyou.
some older m2v's are identified, by DGIndex Batcher, as having illegal field order transition and then corrected.
The Batcher dont detect field order transition, it intercepts [and auto closes] any alert dialog from the DGIndex, and auto accepts or rejects the offer to correct the illegal transition based on your Batcher options dialog selections.
EDIT: IIRC, where Illegal Field Order Transition is intercepted, the files are moved to the PROBLEM folder for later perusal, [and not
forwarded to MeGUI_AutoEncode_Batcher, if that option was selected in DGIndex_Batcher control dialog]
EDIT: You sometimes get an Illegal transition at either end of a clip, due to somebody adding leading or trailing
sequence that did not belong with the original movie [quite often all black]. If it happens at the end it probably dont matter at all.
Suggest that you do as DG proposes, and make request at DG Tools forum for DGIndex Info window Log, Field Order update.
[The Batcher does not need or touch that log at all].
Danette
4th May 2021, 14:22
DGIndex writes the Info window contents to a log file when closed. If a save project is done without a previous play/preview, then the Field order is not populated. It's fixable but you'll have to make a request at the DG Tools forum.
Thanks. I've submitted the request.
videoh
4th May 2021, 15:07
I'm not seeing anything at DG Tools forum. Where and how did you submit a request? You have to become a member and then create a thread in the appropriate forum. Thank you.
http://rationalqm.us/board/index.php
StainlessS
4th May 2021, 15:43
By the way Danette,
If you insert this [or just the ones you are interested in]
DGI_Field_Order = "__Field_Order__"
DGI_Stream_Type = "__Stream_Type__"
DGI_Profile = "__Profile__"
DGI_Frame_Size = "__Frame_Size__"
DGI_Display_Size= "__Display_Size__"
DGI_Aspect_Ratio= "__Aspect_Ratio__"
DGI_Frame_Rate = "__Frame_Rate__"
DGI_Video_Type = "__Video_Type__"
DGI_Sequence = "__Sequence__"
DGI_Frame_Struct= "__Frame_Struct__"
DGI_Frame_Type = "__Frame_Type__"
DGI_Colorimetry = "__Colorimetry__"
into your DGIndex template, and in the Batcher control dialog whosit tick the "Insert Infos" option,
it will fill in the entries so you can see them in the generated AVS file as well as the log file. [when log mod added for Field order]
Might look like this.
DGI_Field_Order = "Top"
DGI_Stream_Type = "MPEG2 Program"
DGI_Profile = "main@main"
DGI_Frame_Size = "720x576"
DGI_Display_Size= "720x576"
DGI_Aspect_Ratio= "4:3 [2]"
DGI_Frame_Rate = "25.000000 fps"
DGI_Video_Type = "PAL"
DGI_Sequence = "Field/Frame"
DGI_Frame_Struct= "Frame"
DGI_Frame_Type = "Interlaced"
DGI_Colorimetry = "BT.470-2 B,G"
EDIT:
Or even
# ***
# The field order is type __Field_Order__ : Full Frame Aspect Ratio is __Aspect_Ratio__ : Frame Type is __Frame_Type__
# ***
Will insert into AVS
# ***
# The field order is type Top : Full Frame Aspect Ratio is 4:3 [2] : Frame Type is Interlaced
# ***
videoh
4th May 2021, 19:56
Does DGIndex Batcher use CLI or does it open DGIndex normally? If it uses CLI, try giving the -preview option.
kedautinh12
4th May 2021, 21:02
Asd-g updated new ver, can you add this to DGMPGDec
https://github.com/Asd-g/MPEG2DecPlus
videoh
4th May 2021, 23:30
Asd-g updated new ver, can you add this to DGMPGDec
https://github.com/Asd-g/MPEG2DecPlus Yes, I already have it on my to-do list.
StainlessS
5th May 2021, 00:00
Does DGIndex Batcher use CLI or does it open DGIndex normally? If it uses CLI, try giving the -preview option.
-preview Previews the first 100 frames (used for log generation).
It uses AutoIt Run command to execute, if not previously running, but thanks for the suggestion.
[I dont know how its low level implemented].
AutoIt docs
Run
Runs an external program.
Run ( "program" [, "workingdir" [, show_flag [, opt_flag]]] )
Remarks
Paths with spaces need to be enclosed in quotation marks.
To run DOS (console) commands, try Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE) ; don't forget " " before "/c"
Batcher AutoIt code
; Check if Batcher TARGET is already running, if not, then start it.
If Not WinExists($MAIN_WN) Then
If $DEFAULT_AUTO_EXECUTE Then
Dim $LoopCnt = 0
Do
; Dont enclose Working Directory ($CLIP_DIRECTORY) in quotes, it dont work.
Run('"' & $EXECUTABLE & '"', Fn_AppendSlash($CLIP_DIRECTORY))
If @error = 0 Then
ProcessWait($PROCESS_NAME)
Sleep(1000) ; a little time to get up, and a window
If $LoopCnt > 0 Then
UpdateIni() ; Update $EXECUTABLE
EndIf
ExitLoop
EndIf
If MsgBox(8192 + 32 + 1, 'Problem Unable to run ' & $PROCESS_NAME, 'Find ' & $PROCESS_NAME) <> 1 Then Exit 1
$EXECUTABLE = FileOpenDialog('Finding ' & $PROCESS_NAME, $EXECUTABLE, '(' & $PROCESS_NAME & ')', 1 + 2, $PROCESS_NAME)
$LoopCnt = $LoopCnt + 1
Until 1 + 1 <> 2 ; 4E4, ... For a long time.
Else
MsgBox(0, 'Problem', $PROCESS_NAME & ' does not appear to be started, please check')
Exit 1
EndIf
EndIf
We dont actually need to use any -preview type command option, Also, we need to do things in order, and only if required, and is no
problem to send the F5 key to start preview when/if required.
[EDIT: Also, we process multiple VOBs/MPGs with single instance of DGIndex, and may need start Preview for each of them]
Preview
; If get Infos required then do Preview and get Field Order
If $INSERT_INFOS <> 0 Then
Fn_ConsoleWrite('STEP_14 Activate Main Window')
Fn_WinActivate($MAIN_WN, $MAIN_WN_TXT, $DEFAULT_WAIT_TIMEOUT)
Fn_ConsoleWrite('STEP_15 Select Preview via F5 key')
Fn_Send($MAIN_WN, $MAIN_WN_TXT, $KEY_F5) ; Preview
Sleep(5)
Fn_ConsoleWrite('STEP_16 Wait for Information Window to appear')
if Fn_WinWaitActive($INFORMATION_WN, $INFORMATION_TXT) then ; Wait for the Indexing Information window to appear
Sleep(5)
Fn_ConsoleWrite('STEP_17 STOP Preview via ESC key')
Fn_Send($MAIN_WN, $MAIN_WN_TXT, $KEY_ESC) ; STOP Preview
Fn_ConsoleWrite('STEP_17 Preview Get Field Order') ; Not available in Save Project Info window
Sleep(5)
$Status[0] = ControlGetText($INFORMATION_WN, $INFORMATION_TXT, $DGISTR[1][0]) ; Get Field Order
If @error Then
Fn_ConsoleWrite('STEP_17 Get Field Order FAILED')
Sleep(1)
Else
Fn_ConsoleWrite('STEP_17 Got Field Order Status ' & $DGISTR[0][0] & ' = "' & $Status[0] & '"')
Endif
Fn_WinClose($INFORMATION_WN, $INFORMATION_TXT) ; Close the Information window
Else
Fn_ConsoleWrite('STEP_17 Wait Information Window FAILED')
EndIf
EndIf
Yes, I already have it on my to-do list.
Oh good, I was wondering how to answer that, thought it was targeted at me.
videoh
5th May 2021, 01:39
Thank you for the explanation, SS. I can add a -preview option to GUI mode too, but it may be a while, so feel free to solve it your own way using AutoIt. ;)
StainlessS
5th May 2021, 01:46
Thanks, sounds very useful, even when implemented we would continue with current method, so as to work with older + newer versions.
Danette
5th May 2021, 23:14
By the way Danette,
If you insert this [or just the ones you are interested in]
into your DGIndex template, and in the Batcher control dialog whosit tick the "Insert Infos" option,
it will fill in the entries so you can see them in the generated AVS file as well as the log file. [when log mod added for Field order]
This seems like it should work with the ideal output, but I cannot figure out how to do it. I've created an AVS file with the code you mentioned as the contents, then added that AVS file as the template in DGIndex, but it never outputs a log file and reports a failure to overwrite the template file for some reason.
However, I am not clear if you were intending to modify, through autoit, DGIndex Batcher to generate these complete (vs. the currently incomplete) log files. It does seem that it is a DGIndex issue, but videoh is not going to work on it on the assumption that your are addressing it.
If that is the case, I will not try to figure out how to get your 'Template' idea to work. Please clarify, so that I know if I should wait for a modified DGIndex Batcher version or pursue the 'Template' approach.
StainlessS
6th May 2021, 08:20
Firstly, DGindex and DGIndex Batcher are two entirely different whotsits.
The Batcher has nothing to do with DGIndex's log file, does not read it, does not touch it.
If you want the DGIndex log update, then make request in DG's forum.
DGIndex [Not the Batcher] can auto create an AVS file based on a DGIndex template, and this template MUST be
set via DGIndex Menu/Option/Template/ to point to YOUR required template. This MUST be done before using the batcher.
The Batcher will only insert Infos into an avs file auto created by DGIndex and its template option.
The Batcher just emulates a users behaviour, ie presses buttons and clicks things and such in DGIndex GUI.
Additionally, as a special option, the batcher can replace special format strings in a DGIndex template generated file,
with the inserted infos taken from the DGIndex preview window. If an output AVS file already exists, DGIndex will not generate
another from the template, BUT, in the batcher control dialog window, there is an option to auto delete any existing file of the same name
as would be generated by DGIndex, it will delete the already existing file before DGIndex attempts to create the avs, and in doing so will
make sure that DGIndex WILL create the avs even if it was already existing.
Also, [I think this is correct, but not 100% sure without looking at source code] DGIndex will overwrite d2v files if already existing,
but will only do so IF YOU give it the go ahead via a dialog box [the whole point of the batcher is to do things without having
to be there filling in dialog boxes, and so will auto delete existing d2v's too, if that option is set in the Batcher control dialog box on startup.
If the option to delete existing d2v is not selected in the batcher control dialog, and the d2v does exist, then it will still be sitting there
ad-infinitum until you attend to the DGIndex confirmation to delete dialog box.]
So, copy the later given template into your DGIndex Template folder. Then,
In DGIndex [run it] and set the Template to this copied file. Exit DGIndex.
In the Batcher ini file, ie "DGIndex_Batcher.ini", just check that this entry points to the desired DGIndex executable. [DGIndex was updated recently].
The ini might look something like this, in blue points to the DGIndex executable that will be started..
[Default]
EXECUTABLE=C:\NON-INSTALL\DGMpgDec\DGIndex.exe
MEGUI_BATCHER=D:\DVD\BATCH_TEST\MeGUI_AutoEncode_Batcher.exe
CLIP_DIRECTORY=D:\DVD\BATCH_TEST\
SAVE_DIRECTORY=D:\DVD\BATCH_TEST\OUTPUT\
JOIN_FILES=1
JOIN_FROM_ONE=1
AUTO_OVERWRITE=1
AUTO_OVERWRITE_AVS=1
IGNORE_AUDIO_DELAY=1
INSERT_INFOS=1
CORRECT_FIELDORDER=0
AUTO_CLOSE=1
BEEPER=0
CALL_MEGUI=0
MEGUI_STOP=0
EDIT: If the Executable is wrongly set, then delete the ini file and it will be re-created and ask for you to point to correct executable, will also
need to set the other options in the Batcher control dialog.
Here is the TEMPLATE to copy into the DGIndex.exe template directory. [then set the template option in DGIndex.Exe]
DGIndexBatcher_TEMPLATE.avs
# Standard DGIndex Infos
VideoFileName = "__vid__"
AudioFileName = "__aud__"
AudioDelay = Value("__del__")
# DGIndex_Batcher Infos
# ***
# The field order is type __Field_Order__ : Full Frame Aspect Ratio is __Aspect_Ratio__ : Frame Type is __Frame_Type__
# ***
# Stuff from DGIndex Information Window will be inserted into below '__stuff__' insertion markers.
DGI_Field_Order = "__Field_Order__"
DGI_Stream_Type = "__Stream_Type__"
DGI_Profile = "__Profile__"
DGI_Frame_Size = "__Frame_Size__"
DGI_Display_Size= "__Display_Size__"
DGI_Aspect_Ratio= "__Aspect_Ratio__"
DGI_Frame_Rate = "__Frame_Rate__"
DGI_Video_Type = "__Video_Type__"
DGI_Sequence = "__Sequence__"
DGI_Frame_Struct= "__Frame_Struct__"
DGI_Frame_Type = "__Frame_Type__"
DGI_Colorimetry = "__Colorimetry__"
Mpeg2Source(VideoFileName)
AudioExt = GetFileExtension(AudioFileName)
Aud= (AudioExt==".ac3") ? NICAC3Source(AudioFileName,channels=2,DRC=0)
\ : (AudioExt==".mpa"||AudioExt=="mp1"||AudioExt==".mp2"||AudioExt==".mp3") ? NicMPG123Source(AudioFileName,Normalize=False)
\ : (AudioExt==".wav") ? RaWavSource(AudioFileName)
\ : (AudioExt==".dts") ? NicDTSSource(AudioFileName)
\ : 0
#Assert(!isInt(Aud),"NO AUDIO")
(!isInt(Aud)) ? AudioDubEx(Aud).DelayAudio(AudioDelay).Trim(0,0) : NOP # Trim, chop/add audio to length
(!isInt(Aud) && AudioRate() <> 44100) ? ResampleAudio(44100) : NOP
S= \
"Field Order = " + DGI_Field_Order + "\n" + \
"Stream Type = " + DGI_Stream_Type + "\n" + \
"Profile = " + DGI_Profile + "\n" + \
"Frame Size = " + DGI_Frame_Size + "\n" + \
"Display Size = " + DGI_Display_Size + "\n" + \
"Aspect Ratio = " + DGI_Aspect_Ratio + "\n" + \
"Frame Rate = " + DGI_Frame_Rate + "\n" + \
"Video Type = " + DGI_Video_Type + "\n" + \
"Sequence = " + DGI_Sequence + "\n" + \
"Frame Struct = " + DGI_Frame_Struct + "\n" + \
"Colorimetry = " + DGI_Colorimetry
(DGI_Field_Order != "__Field" + "_Order__") ? SubTitle(S,lsp=0,font="Courier New") : NOP # Dont Show Subs if Infos not inserted
GOT_INFOS = (DGI_Aspect_Ratio=="16:9 [3]")
FAR = (GOT_INFOS) ? 16/9.0 : (DGI_Aspect_Ratio=="4:3 [2]") ? 4/3.0 : 1
Eval( (FAR!=1) ? "MeGUI_DarX=Round(FAR*1000) MeGUI_DarY=1000" : "" )
Return Last
##########
Function GetFileExtension(string fn) { rfn=fn.RevStr i=rfn.FindStr(".") Return (i==0) ? "" : rfn.LeftStr(i).RevStr }
Run DGIndex_Batcher and check out the Avs produced.
EDIT: I'll mod the TEMPLATE file a bit, and re-upload the batcher. later today.
Danette
6th May 2021, 14:30
Yes, I do realize that autoit is just performing a macro function in the operation of DGIndex.
I tried, to the best of my understanding, to use the suggestions, above, but the log file still contains an empty “Field Order”. DGIndex Batcher is fine with the avs files. It is only the log file issue that I am trying to correct.
videoh did just point out, in the DG Tools forum, that all fields are filled correctly in the log when “Preview” is used and the file is closed. So, it does seem that, unless DGIndex Batcher runs that “Preview” function as part of it’s process, the complete log will not be created.
I have my own macro program (similar to autoit) that I use and can run the files through the “Preview” function in DGIndex to generate the complete log files, now that I know how they are created. I was hoping to have DGIndex Batcher do it for the sake of simplicity.
Before I make this macro, I’ll wait and take a look at your modification when you post it, to see if it solves my issue. Thanks for doing this.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.