Hi. I'm having trouble with FreezeFrame, this is my first attempt at using it. Can I check that I understand the function correctly: FreezeFrame(x,y,z) – x=where the freeze is to begin, y=x+the number of frozen frames, z=the frame to be frozen.
Here's the script I'm working on:
c=trim(161330,161470).amplify(0)
d=trim(161840,162170).amplify(0)
e=trim(163080,163240).amplify(0)
f=trim(163844,163931).amplify(0)
trim(159952,165593)+c+d+e+f.FreezeFrame(165593,165 893,163926).fadeout0(60)
My aim is to end the movie with 12 seconds of frame 163926 (12x25=300, 165593+300=165893).
Executing “trim+c+d+e+f” gives me a video of 8068 frames. The full script loads without any error messages and I get a fadeout of 'f' but the new movie is still 8068 frames – FreezeFrame has been completely ignored.
Can anyone show me where I'm going wrong? Thank you.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 13 of 13
Thread
-
-
AviSynth Wiki – FreezeFrame
The FreezeFrame filter replaces all the frames between first-frame and last-frame with a copy of source-frame. -
Use Loop() to insert copies of frames. Note that Loop() repeats the audio as well as the video. So you'll need to adjust your audio handling to compensate.
There's also an error in your script. You're appending "f.FreezeFrame(165593,165 893,163926).fadeout0(60)" You're piping f to FreezeFrame, but f is only 48 frames in length. I think you meant to use "f+FreezeFrame...."Last edited by jagabo; 22nd Jun 2017 at 08:36.
-
Thanks, lads. Trying LigH.de's suggestion first, I added 300 extra frames like this:
trim(159952,165593)+c+d+e+f+trim(0,299)+FreezeFram e(165593,165893,163926).fadeout0(60)
I changed x,y & z a few times but couldn't find a working formula. If someone could show me how to do it, that'd be great.
jagabo, you seem to be saying that Loop() is the better option. This page here:
http://avisynth.nl/index.php/Loop
gives examples for looping consecutive frames. How do I script it for just one frame?
(Out of interest, that page concludes with the example “Loop(1, 20, 29) # play all frames normally.” What's the point of that??)
Thanks again, sorry to be a pain... -
Set start and end to the same frame.
It's just to help you understand how the function works. Many people expect "times" (the first parameter) to be the number of times the frame (or sequence) is repeated. But it's not, it's the total number of times the frame (or sequence) will appear in the output video. This also means you can use Loop() to remove a frame (or sequence): Loop(0, 20, 29) will remove frames 20 to 29. -
Many thanks jagabo. I did this:
trim(159952,165593)+c+d+e+f.Loop(300,163926,163926 ).fadeout0(60)
and it 'kind of' worked. It looped the frame 3 ahead of the one I wanted! So I just changed the Loop frame by 3 but it looped the exact same frame as before. I did this, though, and it works:
f=trim(163844,163931).amplify(0)
g=trim(163844,163926).amplify(0) #ENDS ON THE FRAME I WANT TO REPEAT
trim(159952,165593)+c+d+e+f+g.Loop(300,163926,1639 26).fadeout0(60)
It seems that my Loop instruction will only work if the final trim ends on the same frame as the one I want to loop. That can't be right so what am I still doing wrong? I thought it might be something to do with 'dot' amd 'plus' but “+Loop()” just gave me nonsense... -
I already pointed out why this doesn't work. You are piping f to Loop() (and earlier to FreezeFrame). f is only 48 frames long so you can't duplicate frame number 163926 of f -- it doesn't exist in f. What's happening is Loop is using the last frame that exists in the clip 47 -- which corresponds to frame 16931 of the original clip because of the earlier f=trim(163844,163931).amplify(0). Reducing the duplicated frame number by 3 doesn't change anything because frame 163923 also doesn't exist in f. What you want is something like:
Code:g = Loop(300,163926,163926).Trim(163926, 163926+299) # use AudioDub() to add correct audio trim(159952,165593)+c+d+e+f+g.fadeout0(60)
Last edited by jagabo; 22nd Jun 2017 at 11:47.
-
Thanks again! I did think of putting Loop in the cdef list – I had “g=loop(300,163926,163926)” which, to me, seemed a perfectly valid command. My final “trim...+c+d+e+f+g” failed, of course. With regard to your definition of 'g' could you explain what the second half of it [.trim(163926, 163926+299)] means in English? Continued thanks...
-
“g=loop(300,163926,163926)” delivers the entire source clip with frame 163926 repeated 300 times. The following ".Trim(163926, 163926+299)" removed everything except the 300 repeat frames. You could also use: "g=Trim(193926,193926).Loop(300,0,0)", ie, use Trim() to create a single frame video, then repeat that frame to make a 300 frame clip.
You should read the Loop() and Trim() sections of the AviSynth docs. -
I would do the trims first, followed by looping the frame you want and adding it to the end, followed by the fadeout. That's if I'm understanding correctly what you're trying to do.
-
Hi manono – yes, that seems to be what I've ended up with after following jagabo's advice. This is the script that's delivered what I wanted:
c=trim(161330,161470).amplify(0)
d=trim(161870,162015).amplify(0)
e=trim(163080,163240).amplify(0)
f=trim(163844,163931).amplify(0)
g=trim(163844,163926).amplify(0)
h=loop(350,163926,163926).trim(163926, 163926+349).amplify(0).fadeout0(80)
trim(159952,165593).fadein0(60).fadeout0(60).ampli fy(1.5)+c+d+e+f+g+h
Thanks again, jagabo, but as for reading the avisynth docs, I don't find them all that helpful. I'd never have got to your solution from this page:
http://avisynth.nl/index.php/Loop
Similar Threads
-
New Install of Avisynth but can't get it to work
By nostalgia in forum Video ConversionReplies: 8Last Post: 7th Dec 2016, 08:52 -
AviSynth:can't get ffvideosource to work.
By sambat in forum EditingReplies: 5Last Post: 11th Nov 2015, 08:15 -
Cant get MAA2 to work in avisynth because of YV12?
By killerteengohan in forum RestorationReplies: 18Last Post: 12th Jul 2014, 09:23 -
Can't get ApplyRange to work in Avisynth
By VideoFanatic in forum RestorationReplies: 39Last Post: 11th Dec 2012, 17:09 -
Can't get RemoveSpots to work with Avisynth
By VideoFanatic in forum RestorationReplies: 8Last Post: 21st Aug 2012, 08:09