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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th November 2011, 06:18   #1  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
Batching to MeGui - help plz?

'sup guys? I am doing well, besides this 1 thingy, I got like 100 avs scripts I need to que into MeGui. Now, I tried these two:

http://sourceforge.net/projects/meguibatchjobex/
and
http://blog.adminp.com/2010/08/15/ba...eue-for-megui/

Couldn't really make it happen. With the first one I enqued all the files, but it quit with an error once I hit the start, something about out of range this or out of range that.



Anyway, I'd realllly appriciate any help on this... I need to encode like, 100 files per week... I just do it manually... But...

.
DarkT is offline   Reply With Quote
Old 20th November 2011, 17:51   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
DarkT

The 1st one above looks like its a work in progress, could not find an option to open files
and will not do anything without a file. On sourceforge, user reviews are not allowed,
perhaps indicating that it is not ready for anything. As the inteface does not seems
to even be nearly functional after more than a year of development, it is perhaps
a lost cause.

The 2nd one above.
Presume that you have installed AutoIt and ideally the file SciTE4AutoIt3.exe
from the same site. I installed both and just get a frozen progress counter. I
guess thats how far you got too.
I managed to push it past there by changing the script line

WinActivate("MeGUI 0.3.5.0")

to

WinActivate("MeGUI")

But that is as yet as far as I've got. It looks like those AutoIt scripts are tied
to a particular version of a program, as this script seems tied to v3.5.0.
Any changing of the eg MeGUI interface might likewise stop it from working
as it eg clicks in certain areas using x,y coords, if changed then it dont work any more.
I'll see if I can get it to do anything else.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 20th November 2011, 18:05   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
There is an exe in the main program dir of AutoIt called Au3Info.exe, which provides info
on open windows, and it's what you're supposed to use to figure out what coord to 'click on'
in the script. Its documented in the AutoIt help

AutoIt/Using AutoIt/AutoIt Window Info Tool(Au3Info)


EDIT: also available as "Programs\AutoIt v3\AutoIt Window Info"


EDIT:
Have now downloaded 4 different versions of the MeGUI Batch Expansion,
got one to accept drag & drop files once which did create and put avs files into
the MeGUI queue but MeGUI just kept crashing (in fact it did not even crash,
gave and error message about having to close, and then got stuck in a loop
telling you that it was gonna have to close.
__________________
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; 20th November 2011 at 23:03.
StainlessS is offline   Reply With Quote
Old 21st November 2011, 17:48   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Here, AutoIt script (MeGUI_Batch-OneClick.au3) to batch group selected files to 'OneClick'.

For version "MeGUI 2050 (svn)"

Code:
#cs ----------------------------------------------------------------------------

	AutoIt Version: 3.3.6.1
	Author:         myName

	Script Function:
	Batch load file names for conversion into MeGUI. Save on repeated steps for each file.

#ce ----------------------------------------------------------------------------
; Mod by StainlessS
; Batch process all selected files in MeGUI 'OneClick' mode
; -----------------        edit below to suit       ----------------------------

$AUTO_EXECUTE = 1 ; 1=Auto Execute MeGUI if not already running
$MEGUI_EXECUTABLE = "C:\NON-INSTALL\MeGUI\MeGUI.exe";  Modify to suit
$DEFAULT_CLIP_DIRECTORY = "D:\AVS\AVI\New Folder" ; Modify to suit

; -------------------- THESE MAY CHANGE WITH MEGUI VERSION ----------------------
$MEGUI_WINDOW_NAME = "MeGUI" ; Without any version number

$VIDEO_INPUT_BUTTON = "WindowsForms10.BUTTON.app.0.378734a6" ; Class: AviSynth script creator, Video Input '...' button
$FSEL_VIDEO_INPUT_FILENAME = "Edit1" ; ClassnameNN: Video Input File Selector 'file name' edit box
$FSEL_VIDEO_INPUT_OPEN = "Button2"   ; ClassnameNN: Video Input File Selector 'Open' Button

$SCRIPT_CREATOR_ONE_CLICK_ENCODER = "WindowsForms10.BUTTON.app.0.378734a2"
$ONE_CLICK_ENDCODER_GO_BUTTON = "WindowsForms10.BUTTON.app.0.378734a10"
; ------------------------------------------------------------

#include <GuiButton.au3>
#include <Array.au3>

Opt("MouseCoordMode", 2) ;2 = relative coords to the client area of the active window
Opt("CaretCoordMode", 2) ;2 = relative coords to the client area of the active window
Opt("SendKeyDelay",0)    ; Time in milliseconds to pause between keys (default=5).

If Not ProcessExists("MeGUI.exe") And Not WinExists("MeGUI") Then
	if $AUTO_EXECUTE then
		run($MEGUI_EXECUTABLE)
		WinActivate($MEGUI_WINDOW_NAME)
		WinWaitActive($MEGUI_WINDOW_NAME)
	else
		MsgBox(0, "Problem", "MeGUI does not appear to be started, please check")
		Exit
	endif
EndIf

$fileChoice = FileOpenDialog("Choose file(s) to process", $DEFAULT_CLIP_DIRECTORY, "All Files (*.*)", 4)
;BlockInput(1)

If @error Then
	MsgBox(64, "Problem", "No file(s) selected")
	;BlockInput(0)
	Exit
Else
	$afileChoice = StringSplit($fileChoice, "|")
	;Sleep(1000)
EndIf

;_ArrayDisplay($afileChoice)
;MsgBox(0,"Count","Total array elements: " & UBound($afileChoice))

WinActivate($MEGUI_WINDOW_NAME)
MouseClick("primary", 22, 12) ; Input TAB in Main Window

If UBound($afileChoice) - 1 >= 2 Then
	$sn = 2		; Directory and multiple files
Else
	$sn = 1		; Single file only
EndIf

$totFiles = $afileChoice[0]

For $c = $sn To UBound($afileChoice) - 1

	If UBound($afileChoice) > 2 Then
		$fileName = '"' & $afileChoice[1] & "\" & $afileChoice[$c] & '"' ; concatenate directory & filename
	Else
		$fileName = '"' & $afileChoice[$c] & '"' ; Filename only
	EndIf

	ConsoleWrite($c & ":" & $fileName&@CRLF) ; Output to console window

	Send("^r") ; CTRL + R, Brings up AviSynth script creator in tools menu.

	Sleep(100)
	WinActivate("MeGUI - AviSynth script creator")
	WinWaitActive("MeGUI - AviSynth script creator")
	ControlClick("MeGUI - AviSynth script creator", "", $VIDEO_INPUT_BUTTON) ; Video Input '...' button
	; Fileselector to select source file for AviSynth script creator.

	Sleep(100)
	WinActivate("Select a source file")
	WinWaitActive("Select a source file") ; File Selector
	ControlSend("Select a source file", "", $FSEL_VIDEO_INPUT_FILENAME, $fileName, 1) ;Set selected file name

	Sleep(500)
	ControlClick("Select a source file", "", $FSEL_VIDEO_INPUT_OPEN) ;click the Open button for video source fileselector

	Sleep(100)
	WinActivate("Please choose your prefered way to open this file","")
	WinWaitActive("Please choose your prefered way to open this file","")
	ControlClick("Please choose your prefered way to open this file", "",$SCRIPT_CREATOR_ONE_CLICK_ENCODER) ;select OneClickEncoder

	Sleep(100)
	WinActivate("MeGUI - One Click Encoder","")
	WinWaitActive("MeGUI - One Click Encoder","")
	ControlClick("MeGUI - One Click Encoder", "", $ONE_CLICK_ENDCODER_GO_BUTTON) ;select GO Button
	Sleep(100)

Next

Sleep(2500)
;BlockInput(0)

WinActivate($MEGUI_WINDOW_NAME)
WinWaitActive($MEGUI_WINDOW_NAME)
MouseClick("primary", 62, 12) ; Queue TAB in Main Window
MsgBox(0, "Queue completed", "OK, I think I am done. You can start it now. " & @CRLF & "Processed " & $c - $sn & " items.")
Works pretty good.
__________________
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; 21st November 2011 at 17:51.
StainlessS is offline   Reply With Quote
Old 21st November 2011, 19:06   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I dont actually use 'OneClick', and checking output of above, I see that the aspect ratio
is 1:1. Doing a manual 'OneClick' render, I still keep getting 1:1, whatever setting are
used in "output resolution" or 'aspect ratio'. Is the aspect ratio stuff broken in
'OneClick' mode ?

The source files were a few 480x360 4:3 mpegs.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 23rd November 2011, 02:03   #6  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
Dunno, couldnt get it to work at all in my case... This is really sad, I got so much to encode, that it is actually quite bothersome to spend 5-8 seconds on each enqueing... *Sighs* ah well...
DarkT is offline   Reply With Quote
Old 23rd November 2011, 03:28   #7  |  Link
SamKook
Registered User
 
Join Date: Mar 2011
Posts: 216
You could just forget megui and use only the tools from it and make a batch files that process all the .avs in one folder, that would be the easiest way to batch process all your scripts.
SamKook is offline   Reply With Quote
Old 23rd November 2011, 03:31   #8  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
Quote:
Originally Posted by SamKook View Post
You could just forget megui and use only the tools from it and make a batch files that process all the .avs in one folder, that would be the easiest way to batch process all your scripts.
Ummmm, I bet it would be... If... Ummm... If only I had an inkling of an ounce of what you are talking about! *grins*

I suppose it'd be not too difficult for somebody to make a script which would take all .avs in any particular directory then --> x264 with whatever parameters you wish + audio through audio progs ---> Mkvmerge...

But I wouldn't really be able to do that .

Edit:

OOH! I got a brillliant idea! So simple a MONKEY could do it! Ok, Mouse-Macro! just gonna download a program which records what the mouse does and then re-does it! ho ho ho! This is gonna take some time... But whatever, it should work .

Last edited by DarkT; 23rd November 2011 at 03:51.
DarkT is offline   Reply With Quote
Old 23rd November 2011, 03:52   #9  |  Link
SamKook
Registered User
 
Join Date: Mar 2011
Posts: 216
You probably need to change some details, but here's a simplified version of what I use(I haven't tested it in this form so it's not impossible that I made 1 or 2 mistakes.)

Just put this inside a .bat(.txt renamed), change the wrkdir var to where your avs are and change the encoders settings and the path of the tools.
You can use wavi instead of avs2pipe, I only used it because I also get the avs video infos and pipe the video using it.

Code:
@echo off
set x264_08=C:\Program Files\x264_08bit\x264.exe
set x264_10=C:\Program Files\x264_10bit\x264.exe
set a2p=C:\Program Files (x86)\avs2pipe-0.0.3\avs2pipe26_gcc.exe
set aac=C:\Program Files (x86)\NeroAACCodec-1.5.1\neroAacEnc.exe
set merge=C:\Program Files (x86)\MKVtoolnix\mkvmerge.exe
set wrkdir=D:\_1enc_\Aki\
set suffix=Final

REM This is needed to make sure the avs name is refreshed each time
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in ('dir /b "%WrkPath%*.avs"') do (
set Fname=%%a
set avs=%Fname%

"%x264_08%" --preset placebo --crf 18.0 --keyint 240 --min-keyint 30 --ref 12 --rc-lookahead 150 --merange 32 --deblock -1:-1 --psy-rd 1.0:0.10 --no-fast-pskip --output "%wrkdir%%avs%.mkv" "%wrkdir%%avs%.avs"
REM Encode audio in aac by pyping it through avs2pipe
"%a2p%" audio "%wrkdir%%avs%.avs" | "%aac%" -q 0.42 -if - -of "%wrkdir%%avs%.aac"
REM Merge into mkv and if avsname_Chapters.txt exist, use it for chapters
IF EXIST "%wrkdir%%avs%_Chapters.txt" ("%merge%" -o "%wrkdir%%avs%_%suffix%.mkv" "--language" "1:jpn" "--default-track" "1:yes" "--forced-track" "1:no" "--compression" "1:none" "-d" "1" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "%wrkdir%%avs%.mkv" "--language" "1:jpn" "--default-track" "1:yes" "--forced-track" "1:no" "--compression" "1:none" "-a" "1" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "%wrkdir%%avs%.aac" "--track-order" "0:1,1:1" "--chapter-language" "jpn" "--chapter-charset" "UTF-8" "--chapters" "%wrkdir%%avs%_Chapters.txt") ELSE ("%merge%" -o "%wrkdir%%avs%_%suffix%.mkv" "--language" "1:jpn" "--default-track" "1:yes" "--forced-track" "1:no" "--compression" "1:none" "-d" "1" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "%wrkdir%%avs%.mkv" "--language" "1:jpn" "--default-track" "1:yes" "--forced-track" "1:no" "--compression" "1:none" "-a" "1" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "%wrkdir%%avs%.aac" "--track-order" "0:1,1:1")

REM ***cleanup*** only if the merging was sucessful
IF EXIST "%wrkdir%%avs%_%suffix%.mkv" (DEL "%wrkdir%%avs%.aac" && DEL "%wrkdir%%avs%.mkv")
)
Edit: The mouse macro would also work as long as you don't touch your computer during the encodes.
SamKook is offline   Reply With Quote
Old 23rd November 2011, 05:09   #10  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
I'll try your script as soon as I am not sleep deprived... I made a request in the megui thread - maybe it'll be added, who knows... If it is... Hellz yeah .

Anywya, thanks for the script man, if it works it'll be SOOoooooOOOOOOOooooooooooo, SOOOOOOOOOOooooooooooooooooooooooo kickass... Coz srsly, I am doing this shit manually at the moment...

Thanks yo .
DarkT is offline   Reply With Quote
Old 23rd November 2011, 05:59   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Removed, see next post.
__________________
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; 1st December 2011 at 19:51.
StainlessS is offline   Reply With Quote
Old 1st December 2011, 19:57   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Stable version of MeGUI AutoEncode Batcher, v0.1, (native executable with source).

Removed, see this thread here:-

http://forum.doom9.org/showthread.ph...84#post1542984
__________________
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 December 2011 at 21:23.
StainlessS is offline   Reply With Quote
Old 2nd December 2011, 04:49   #13  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
Was away, will check this script and the previous one posted by SamKook, and edit with reply - if they work, it'll be awesome. HEllll - even if just ONE of them works... *grins*
DarkT is offline   Reply With Quote
Old 4th December 2011, 21:27   #14  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
@DarkT,

Dang, previous version of the Batcher had a Vista bug, and probably Win7 too.
See new thread for update linked in previous post. Will now autostart the encodes
if desired and also no re-build necessary as it stored updated defaults in an ini file.

Let us know if it works for you and whether or not you tried on W7.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 6th December 2011, 23:34   #15  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
Old version indeed threw out some error and died. Will try new ver soon. Funny, the one-click thingy in the developer megui thread ALSO did not work *grins* It was fun putting on que ~150 jobs... fun... fun... fun... T.T PLEASE SAVE ME FROM THIS OMG OMG OMGOM GOMG OMG *slits wrists*

Ahem

Anywya, will try the new script, thanks for all the work and stuff!
DarkT is offline   Reply With Quote
Reply


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 05:38.


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