Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 4th December 2011, 21:12   #1  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
MeGUI AutoEncode Batcher v1.23 (29 Jan 2021)

Code:
MeGUI_AutoEncode_Batcher - by StainlessS

http://forum.doom9.org/showthread.php?t=163343
http://www.autoitscript.com/forum/topic/137933-megui-autoencode-and-dgindex-batchers/

Utility to allow group selection of *.AVS files for batching to MeGUI AutoEncode,
the AVS must contain both Video & Audio. The Batcher will display a little blue
icon with an white pyramid, in the system tray.

The utility is tested on MeGUI versions 'MeGUI 2050 (svn)' to 'MeGUI 2513',
with Windows 7, Vista and XP, also tested on a PIII to ascertain if machine speed
is an issue.

The utility is written in 'AutoIt' script language and compiled to a native running
executable without need for the script development environment.

New in v0.11, "MeGUI_AutoEncode_Batcher.ini" will be used for the defaults so that it is no longer
necessary to re-build the executable to change defaults, the ini file will be created on first
use in the same directory as the batcher executable.

On start up, will auto execute MeGUI in default directory "C:\NON-INSTALL\MeGUI\MeGUI.exe".
If MeGUI not found in that directory, then will prompt user for the path to MeGUI, the
new default path will be saved in the ini file.

Can execute MeGUI before the batcher and the batcher will then use the instance of MeGUI
that is already running instead of auto loading it.

The default input AVS clip directory is likewise saved in the ini file.


Prior to use, the Options Menu "Settings" of MeGUI should be set to defaults, so you
can set eg container, bitrate etc. The settings that you will want to check are
on the 'Main' & 'Extra Config' Tabs. In particular, DO NOT enable 'Autostart Queue'
on the 'Main' Tab, this would have MeGUI trying to encode each item as they are added
and will (in 2050 at least) result in a MeGUI crash as more items are added to the list.
It is recommended to have 'Open Preview after Avisynth script selection' ticked,
as you may want to halt the automatic batching in Preview to set the Aspect Ratio for the
clips, if you dont, then you will be subject to whatever aspect ratio that MeGUI thinks
it should be. 

Also look to the settings on 'Extra Config' Tab, in particular the 'Configure Auto Encode Defaults'.
Suggest that you set 'Optional Output Extensions' to something like '-Video' and '-Audio', do not
use valid container extension or elementary stream extension which could confuse eg muxers.

In Addition, you will also need to set the profile settings for both Audio and Video.

Having done all of the above, on running the utility, you will have opportunity to select
to halt the batcher at either the Preview window (to manually set Aspect Ratio) or at
the 'Automatic Encoding' window to eg select bitrate. Also available is the option to
automatically start the encoder after all items have been added to the job queue.
You can also cause the batcher to close without any message box at the end of the batching process.

NOTE, MeGUI 2050 (svn) On VISTA (perhaps W7), once you select an Aspect ratio or tick the
'Preview DAR' check box, the window may shrink and the Aspect Ratio and check box may
have disappeared (those controls may be left 'outside' of the window and invisible), so you may
only get one shot at setting the Aspect Ratio, this is fixed in MeGUI 2065.

v0.12, When the batcher is active, you can press the 'PAUSE' key (usually above Page Up)
and the batcher will pause execution, pressing again will continue the batcher
from where it left off. You can also press 'CTRL+PAUSE' to bring up the HOT GUI, the
little GUI presented at the beginning of execution, to eg change whether or not to
stop on AUTOENCODE Window or Preview Window.
Press left 'SHIFT+CTRL+ALT+PAUSE' and the batcher will terminate.

v1.11 Added "QUEUE VIDEO + AUDIO" (No mux), "QUEUE VIDEO" and "QUEUE AUDIO" options.

v1.13, Note, if Preview is not enabled, then the batcher will wait for 2 seconds on first file, 
to see if it appears, this is a reduction on the 30 sec timeout previously used. Input completion is
now detected by using the output video filename (or audio filename for Audio only) so we can explicitly
tell when MeGUI is ready and waiting, instead of doing it on a timeout or hoping for the preview
dialog box to appear. This filename detection, also now allows use of avs scripts that have a longish
prescan period which would normally timeout and cause the batcher to fail. An example of a prescan that
could previously cause timeout is eg the QueryBorderCrop() compile time script function in the RT_Stats thread on Doom9.
The timeout now is for 7 * 24 hours, so an avs file can have a MeGUI prescan period of up to 7 * 24 hours (But note
that MeGUI seems to do 7 scans prompting 7 avs prescans, perhaps when eg seeking to mid
point for the preview, hopefully 7 * 24 hours is enough for whatever).
QueryBorderCrop() compile time prescan script function:
http://forum.doom9.org/showthread.php?p=1586857#post1586857


Thats about it, except that you should not try to confuse the batcher by messing with
the mouse or keyboard when it is busy. There has been no attempt to lock out user input
when busy, this would require admin privileges on Vista+.
If the batcher should stall, then exit via the system tray icon right button, 'exit'.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Lastly, when setting the MeGUI settings, DONT FORGET to click on the SAVE button on
BOTH windows, otherwise it will not remember your settings when using the batcher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Enjoy.

StainlessS

-----------------------------------------------------------------------------------
Required for re-building of the script, AutoIt is the interpreter/compiler and SciTE4AutoIt3
is an IDE (Integrated Development Environment) for it. To re-build, just click on 'Build' in the
tools menu of the IDE.

AutoIt:- http://en.wikipedia.org/wiki/AutoIt

For details on AutoIt3 : http://www.AutoItscript.com/autoit3

SciTE4AutoIt3 homepage : http://www.AutoItscript.com/autoit3/scite

-----------------------------------------------------------------------------------

v0.1  01 Dec 2011 - First stable release (well I thought so anyway).

v0.11 04 Dec 2011 - Added, ini file for defaults, auto start queue, auto close Batcher.
    Fixed VISTA file selector bug, clicks on 'Cancel' Button instead of 'Open'. Last minute change after
    Vista testing broke it. In XP the open button is Button 2, and in Vista is Button 1 Aarrrrh!

v0.12 12 Dec 2011 - Source script is a DEBUG VERSION.
    Lots of debug info in  developer console window. Not really an issue to keep the debug stuff
    as it dont do anything anyway in a program compiled for GUI.
    Added Hotkeys, 'PAUSE' button (above 'Page Up' usually) is pause script. SHIFT+CTRL+ALT+PAUSE is QUIT Batcher.
    You can also press 'CTRL+PAUSE' to bring up the HOT GUI, the
    little GUI presented at the beginning of execution, to eg change whether or not to
    stop on AUTOENCODE Window or Preview Window.
    No longer using "[CLASS:WindowsForms10.Window.8.app.0.378734a]" style ID's as have found that they
    are based on the path to the executable and so will fail if not in the default path (the number on the
    end is some kind of hash on the path/filename).

	
v1.00 20 Dec 2011 - Source script is a DEBUG VERSION.
    Added Beep opt. Switched to set Fn_SetSysTabIx() instead of clicking pixel relative to The TAB control.

v1.10 24 Feb 2012 - Source script is a DEBUG VERSION.
    Minor mods only, Re-compiled with AutoIt v3.3.8.0

v1.11 10 June 2012  - Changed to Freeware licence.
    Added "Queue Video + Audio", "Queue Video", and "Queue Audio" options. Sped up mouse a bit.

V1.12 26 June 2012
    Fixed, broken OnAutoItExitRegister.
    Fixed, detects & restores minimized target window, could fail in Executable (not script) when batcher called
    via eg desktop shortcut and target is running but minimized (and no other windows open).
    Added Development Debug output log file, controllable via source script only ($WriteDebugFile=true).

V1.13 17 Aug 2012
    Switched to using output filenames to detect when avs input complete, copes with long prescan in avs file.
    Reduced Preview wait timeout to 2 secs from 30, not needed now because of above output filename detection.

v1.14, minor changes only.
v1.15, 23 Feb 2015, Fixed, Append Slash to directory eg "D:" appends "\" when sent to FileSelector. Recompile AutoIt v3.3.12.
v1.16, 02 June 2015. Allow some special characters in filenames eg '#!+'.
v1.17, 06 Feb 2016. Re-compile for AutoIt v3.3.14.2
v1.18, 13 Mar 2018, Recompile AutoIt v3.3.14.5
v1.19, 14 July 2018, Read 'Show Preview Window' setting at startup. (kudge to read tick box status, not exposed in MeGUI tick box control).
	Avoid MeGUI crash when fast click Preview window close button (Fixed in MeGUI development 2868, not fixed in 2836 Stable).
v1.20, 14 Jan 2021, MeGUI Build 2896 Changed name of 'Settings' window to 'Options', and broke the MeGUI_AutoEncode_Batcher.
v1.21, 28 Jan 2021. Some batcher Libary changes.
v1.22, 29 Jan 2021.DGIndex cockup fixed. MeGUI_AutoEncode_Batcher updated to version match.
Find it @ MediaFire in sig (UTILITY FOLDER).

Also see the partner DGIndex batcher already compiled, here (or in sig):-
http://forum.doom9.org/showthread.ph...07#post1543507

NOTE, Both MeGUI Batcher and DGIndex Batcher contain the source for BOTH utilities.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 4th February 2021 at 16:19. Reason: Update
StainlessS is offline   Reply With Quote
 

Tags
autoencode, batcher, megui

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.