Hi. I'd like to convert an mp4 file (AVC/AAC) and, at the same time, make the ending repeat a few times. Using MeGUI, this is the script I ended up with:
Spline64Resize(648,360) # Spline64 (Sharp)
I ended up with 2 'repeats', not 3. Can anyone suggest a reason why?
More importantly, there was no audio on the repeats. After my first encode (for which, as you know, MeGUI doesn't produce a visible script for the audio) I did a second encode, this time loading the '...mp4.avs' created by File Indexer into the Audio Input section. It made no difference.
How, then, do I use the Loop function so that I get audio for the main video and the 'repeats'?
While I'm here, fairly soon I'll be looking to create a scene using MeGUI's AVS Cutter and also Loop a bit of that scene. I foresee problems in that that the frame numbers of the proposed loop will not be the same after the cut has been made. Has anyone been here before and know how to script that?
+ Reply to Thread
Results 1 to 17 of 17
Loop page even implies that you get one less in one of the examples it gives:
Loop(10,20,29) # repeat frames 20 to 29 ten times before going on, actual clip duration increased by 90 frames
More importantly, there was no audio on the repeats.
Has anyone been here before and know how to script that?
LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll ") v = LSMASHVideoSource("E:\summer.mp4") a = LSMASHAudioSource("E:\summer.mp4") AudioDub(v,a) Spline64Resize(648,360) # Spline64 (Sharp) rep = Trim(1772,2245) last++rep++rep
I like MeGUI because the GUI makes it easy to set the CQ factor, cropping, audio bitrate etc. But, OK, I'll have a go doing it the pro way. Jagabo likes 'X264 CLI' – is that the general recommendation?
Jagabo, your script worked perfectly, thank you so much.
Pre-cut the loop section, referencing the original uncut:
"A" = all 30 min = 108,000 frames (at 60fps) or frames 1 - 108,000
"B" = 10min section of "A" = frames 36,001 - 72,000
"C" = last 30 second section of "A" = frames 70,201 - 72,000
"D" = all but last 30 sec of "A" = frames 36,001 - 70,200
"E" = Loop "C" x 5
"F" = "D" ++ "E"
Thanks, Scott, I'll give that a go when the time comes.
Loop( 9, 1549, 1449) Loop( 8, 1448, 1445) Loop( 3, 1123, 1111) Loop( 5, 1004, 1000)I ended up with 2 'repeats', not 3. Can anyone suggest a reason why?
Thanks, Richard1485, although I confess I don't fully understand your example. Are the big spaces essential?
I think anyone would agree that the 'official' definition of Loop is not quite right. My guess is the author wasn't concentrating...
The big spaces are unnecessary. I cut and pasted a portion of a script I had been working on (and simplified it quickly), and I sometimes use tabs when writing big and complicated scripts.
You mentioned that successive calls to Loop() (or whatever) change the frame-numbers. That's true, but if you work backwards, you can avoid that problem. You are scrubbing through a video and decide to loop the tenth frame.
AviSource() ShowFrameNumber(scroll=true) Loop(2,10,10)
AviSource() ShowFrameNumber(scroll=true) Loop(2,45,45) Loop(2,10,10)I think anyone would agree that the 'official' definition of Loop is not quite right.
AviSynth developers don't have English as their first language and didn't quite understand the proper meaning of the word. Or maybe there's a real reason Loop works as it does - an instance where the usage depends on needing to call for one more repeat than thought, as Richard1485 before me mentioned. However, that usage isn't really a necessary part of a Loop, and could equally easily be done with Trim or DeleteFrame or stickboy's JDL_DeleteRange.
It doesn't really matter, though, once you understand what's going on. I've come across a similar problem with the Dissolve filter but once I discovered it the fix was easy - dissolve one more frame than one thinks should be necessary.
Last edited by manono; 25th May 2016 at 17:28.
However, that usage isn't really a necessary part of a Loop, and could equally easily be done with Trim or DeleteFrame or stickboy's JDL_DeleteRange.
Hybrid, others StaxRip, others RipBot264, others XviD4PSP, others Simple x264/x265 Launcher, etc. Try them out for yourself. Choose the one that has the features you want, the complexity or lack thereof you seek, the GUI you find the most intuitive, etc.
Vdub also. The one thing that bites me in the backside from time to time,
if you have the FFmpeg input plugin it takes control of the *.avs files instead of default Vdub input handler.
Sometimes it's transparent and other times causes all kinds of problems..
Is there a way to disassociate *.avs files with the FFmpeg input plugin? (I know you can temporarily rename it in the
Virtualdub plugins32 folder, but I was hoping for something a little more elegant)
Back to the subject of looping, and my scenario of making a cut from the original movie, said cut to contain a loop. After some experimentation, it seems that I'm better off with Trim rather than Loop (thanks, jagabo). Here's a script which I've successfully tested and you can see it includes cropping, colour adjustment, deinterlacing, volume adjustment and a couple of scene repeats. While I'm chuffed that I've managed to do this, I'd welcome any comments on how the script might be tidied up or improved:
global MeGUI_darx = 4
global MeGUI_dary = 3
crop(6, 0, -12, 0)
rep1 = Trim(20759,20959)
rep2 = Trim(21309,21509)
This is just curiosity - when I was still trying to use 'Loop' I had this script:
b=NicAC3Source("E:\zloop T80 2_0ch 192Kbps DELAY -96ms.ac3")
It handled the loop OK (original length plus scene repeat) but the repeat was silent. Why would that be?
Thanks to all for your interest.
VirtualDub or a AvsPmod etc, I've got to use something and I prefer MeGUI's preview. If MeGUI didn't make it easy to modify the scripts it creates it'd be a different story, but it does.
I find AvsPmod a bit frustrating because unless the script is reasonably simple it seems to get bogged down fairly quickly.
I use MPC-HC for previewing scripts quite a bit as I can drag the player over to the TV and preview the script full screen.... the same way I'd be watching the encoded version. After editing a script, Ctrl+E gets MPC-HC to reload it.
Aside from it's preview, the main things I use MeGUI for are it's Script Creator for calculating resizing after cropping etc, otherwise I'd have to work it out myself, and it's not uncommon for me to have many jobs in the queue that'll each take a few hours to run.... and enough of them to keep the PC busy for several days. I don't know how others handle that sort of situation but I like a job queue I can start and stop or change the number of encodes running simultaneously according to how slow the filtering is.
Last edited by hello_hello; 30th May 2016 at 03:38.