Log in

View Full Version : AviSynth Script Alignment (MeGUI)


Pages : 1 [2]

hello_hello
30th January 2015, 08:22
Here the alternative MeGUI Batcher by Corpsecreate:
http://forum.doom9.org/showthread.php?p=1633590#post1633590

And my offering (I have mentioned it to you before, dont know if you tried it): http://forum.doom9.org/showthread.php?t=163343&highlight=MeGUI+AutoEncode+Batcher

Thanks. If you've mentioned those before I don't recall it. Sorry, but I will check them out this time. I've already read a lot of the info from your second link, I've just got to read it again and take it in.....

To be honest, and I think about it every time I add more than a few scripts to the queue at a time, I probably should set up the OneClick encoder. For me, it'd probably do the job (given it can use scripts for the video input and batch encode).
I generally always create each script manually, so I should be able to tell OneClick not to touch anything and just encode......

My manual workflow tends to go something like this:
Open video and index (sometimes extract audio)
Create script
Load script
Add video encoding job to queue
Open encoded video with MKVMergeGUI
Add source file (quite often MKV)
De-select original video stream
Remux

Mostly, I don't re-encode audio. If I do I'd (batch) re-encode it with foobar2000, but that aside I'm virtually always adding "existing" audio to the video output for muxing, or I'm adding the source file to the muxing job while keeping everything but the original video.
So if there's a way to automate that process.

The script creating part I'm happy to do. And it just occurred to me how to batch index with FFMS2 nice and easily.
Highlight a bunch of files, right click, SendTo AviSynthesizer(mod), it creates a script to open each file with FFVideoSource and append them, right click, send script to MPC-HC, wait for video to display or AVISynth to complain the frame sizes don't match, indexing done, delete script.
That seems to work. Possibly for other indexers too. Why haven't I been doing that or the last 157 years? Now if I could double click on an index file and it'd automatically open in MeGUI's script creator.......

Anyway, I'll check out the batch scripts, but if you have any suggestions....

Apologies to Music Rockz for sidetracking the thread a little. Well, more than a little. Sorry.

StainlessS
30th January 2015, 15:25
Thanks. If you've mentioned those before I don't ...
http://forum.doom9.org/showthread.php?p=1667698#post1667698

I don't think there's a way to send multiple files to Avisynthesizer in order to create multiple, individual scripts.
And see last post a few posts later. Since linked post, added Batch template, where creates a script for each video file rather than
standard concatenation mode. (select a dozen of so files, click OK, a dozen [or so] AVS files appear like magic).


I guess I should take a look at OneClick, quite some time since I tried it, we all get stuck in our ways :)
Great idea for the indexing.

hello_hello
30th January 2015, 21:21
Ahhh, I remember the thread you linked to now. I think maybe it was a case of trying something (AvisynthesizerMod) then having to spend time in the real world, and even though I fully intending to come back to it, I forgot. It probably won't be till early next week before I can spend a lot of time messing around again, but this time I will. Zip file already downloaded and on my desktop to remind me.

Cheers.

Music Rockz
31st January 2015, 04:08
That sounds like same problem I sometimes had with MeGUI, but using installed 2.6 Alpha 5, and either MPEG2Source or AviSource (cant remember which, maybe both),
Happened to me when long timeout (avisynth busy doing prescan) when loading script. MeGUI opens script about 5 times before preview and a few more when
selecting eg AutoEncode (number probably dependant upon settings), each of the openings would produce another prescan (eg RoboCrop or whatever).
Solution in my case was to turn OFF "Improved AVS Opening" on Main Configurations dialog in Settings.
I had this problem too. At the start I enabled "Improved AVS Opening" but it resulted in Crash, but after disabling it MeGUI shows no error regarding this!

StainlessS
31st January 2015, 05:34
IIRC, "Improved AVS Opening" shows preview @ middle of clip timeline, whereas when switched OFF, shows @ start, perhaps SEEK related.
You can view number of times MeGUI re-opens clip (and thereby find out which of the multiple re-openings are in progress) by using
RT_Stats command eg

RT_DebugF("*** HERE I AM ***")

somewhere near beginning of script. Need DebugView (Google) to view the output messages. EDIT: First line probably best.

EDIT:
or maybe eg

RT_Writefile("MyLog.Log", "*** HERE I AM *** @ %s", RT_LocalTimeString(file=False), Append=True)

without DebugView

EDIT: Or something like this could keep track of how many times script opened, for whatever reason.

LOG = "MyLog.txt" COUNTER = "MyCounter.txt"
CNT = (Exist(COUNTER) ? RT_NumberValue(RT_ReadTxtFromFile(COUNTER,Lines=1)) : 0) + 1
RT_Writefile(LOG, "%d ] *** HERE I AM *** @ %s", CNT, RT_LocalTimeString(file=False), Append=True)
RT_Writefile(COUNTER, "%d", CNT, Append=False)

# ...

Colorbars.KillAudio.Trim(0,-10).ConvertToYV12 # Your Script (only 10 frames)

# ...

ScriptClip("""
(current_frame==FrameCount-1)
\ ? RT_Writefile(LOG, "%d ] *** LAST FRAME, CLOSING SCRIPT *** @ %s", CNT, RT_LocalTimeString(file=False), Append=True)
\ : NOP
Return Last
""")
Return Last

EDIT: Added ConvertToYV12

Run it a few times. Full clip would need be played, Ideally would need something called from filter Destructor for closing.


1 ] *** HERE I AM *** @ 2015-01-31 07:18:05.000
1 ] *** LAST FRAME, CLOSING SCRIPT *** @ 2015-01-31 07:18:05.593
2 ] *** HERE I AM *** @ 2015-01-31 07:19:18.875
2 ] *** LAST FRAME, CLOSING SCRIPT *** @ 2015-01-31 07:19:19.453
3 ] *** HERE I AM *** @ 2015-01-31 07:46:29.234
3 ] *** LAST FRAME, CLOSING SCRIPT *** @ 2015-01-31 07:46:29.796