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. |
31st May 2010, 18:36 | #1 | Link |
Registered User
Join Date: Nov 2004
Location: São Paulo (Saint Paul) - Brazil
Posts: 208
|
Insert Blank And Fade In/Out
Hi, I'm having some difficulties to fix one of my videoclips using AviSynth. The thing is, I would like to insert a blank space in the beginning (first 200 frames) and only then fade in (some 30 frames) - fading from the very first frame as you know, won't work at all. I'd like to achieve the same effect at the end of the video, inserting fade out (let's say 30 frames) and after the last blank frame, inserting some blank space 'til the end of the video clip (some more 200 frames). I was trying to do this with InsertFrame + Fade In/Out but the result is nor acceptable. Thanks in advance.
|
31st May 2010, 19:08 | #3 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Note that fadeio will add an extra frame of black at the end of your clip - won't cause you any problems but you could use fadeio0 in this case, since you're adding the black yourself.
Incidentally, I've never understood how this bit in the documentation works: Quote:
David |
|
31st May 2010, 19:23 | #4 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Repeating fade twice more reduces it to (1-x)^3. Hence for x=0.5, level is 1/8 = 12.5%, at x=0.75 level is 1/64 = 1.6%, etc Last edited by Gavino; 31st May 2010 at 19:25. |
|
1st June 2010, 10:38 | #5 | Link |
Registered User
Join Date: Nov 2004
Location: São Paulo (Saint Paul) - Brazil
Posts: 208
|
Thanks to both of you to take time to respond. I was thinking about a++b++c etc.., I mean editing 3 clips so that I could insert the blank space and then the fade in/out. I'll give it a try and reply as soon as possible.
Thank you very much. PS: I think that'd be a good idea to edit a tutorial for newbies on how to edit in AviSynth. I've seen some guides on the web but most are outdated and miss parts such as the explanations right above. Cheers, Mark |
1st June 2010, 11:35 | #8 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
If there are specific bits that you find hard to understand, raise it on the forum and we can answer your question and/or improve the documentation. The wiki is constantly being updated (hopefully, for the better).
|
1st June 2010, 12:12 | #9 | Link |
Registered User
Join Date: Nov 2004
Location: São Paulo (Saint Paul) - Brazil
Posts: 208
|
Thanks Gavino. I'll remember that. I meant the guide that comes with AviSynth is difficult for newbies not confusing, in spite of the fact I couldn't find what I was looking for, so that's why I have submited this new thread. There are some functions such as editing and improving video quality (filters) that are (or may be) the most used ones and those should be easily avilable for the ones who prefer this wonderful application over payware. Thanks.
|
1st June 2010, 12:42 | #10 | Link |
Registered User
Join Date: Nov 2004
Location: São Paulo (Saint Paul) - Brazil
Posts: 208
|
It doesn't work. Here's the script:
avcsource("C:\last_vacation.dga") GradFun2DBmod() BlankClip(length=380, width=1280, height=720, fps=30) + FadeIO(20)+BlankClip(length=786, width=1280, height=720, fps=30) #At the end of the clip, I want blank the frames between (6403,7189) and fade out the previous 20 Lanczos4Resize(720,480) Something like this: blank(0 to 380)-fadein(20)-clip length-fadeout(20 frames)-blank(6403 to 7189). |
1st June 2010, 14:46 | #11 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
You don't say in what way it doesn't work, but I suspect you are getting an error in trying to join clips of a different colorspace or framerate. You need
BlankClip(last, length=380) + FadeIO(20) + BlankClip(last, length=786) BlankClip is one of the few filters which does not default to 'last' for its input. |
1st June 2010, 17:26 | #12 | Link | |
Registered User
Join Date: Nov 2004
Location: São Paulo (Saint Paul) - Brazil
Posts: 208
|
I'm sorry if I was misunderstood. That's the same clip, the same colorspace (YV12), same framerate. It doesn't work because all I can see in VDMod is a black screen. Nothing more. Thanks for the syntax, let's see if it works this time.
Cheers PS: here's the result; it works this time but AviSynth is adding blank frames, and is not covering the first 380 and the last 786 ones. I guess I didn't make myself clear in the begining of this thread; Quote:
Cheers Last edited by Cunhambebe; 1st June 2010 at 17:34. |
|
1st June 2010, 17:51 | #13 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Ah, I see. You want to replace the first 380 frames with black ones rather than adding 380 black ones? Similarly with 786 frames at the end? Then you want:
Code:
BlankClip(last, length=380) + Trim(380, FrameCount-787).FadeIO0(20) + BlankClip(last, length=786) Code:
Trim(380, FrameCount-787) BlankClip(last, length=380) + FadeIO0(20) + BlankClip(last, length=786) Last edited by Gavino; 1st June 2010 at 18:10. Reason: alternative code |
2nd June 2010, 12:05 | #14 | Link | |
Registered User
Join Date: Nov 2004
Location: São Paulo (Saint Paul) - Brazil
Posts: 208
|
Thanks a lot for taking time to respond, Gavino. Did you see what I wanted to say when I stated that a new and more simple AviSynth guide would be nice? I would never find a way to fix this without your help - as any other newbie.
Quote:
Cheers and many thanks to you. PS: Now it's working. Thanks a lot, man. Cheers! Please think about a new guide - that'd be so cool. People who don't know AviSynth don't know what they are missing. PS2: How about if I wanted to fade out the last 40 frames and fade in the first 20 ones? Thanks in advance Last edited by Cunhambebe; 2nd June 2010 at 12:15. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|