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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

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

Reply
 
Thread Tools Search this Thread
Old 18th October 2005, 22:40   #1  |  Link
iparout
Registered User
 
Join Date: Aug 2002
Location: Greece
Posts: 403
Please help with fade command

Hi.

I am a complete noob when it comes to scripting, so I need some help adding fade-in and fade-out effects on a video.

The source video (f:\capture-huffy.avi) has commercials, so I used the trim command to edit them out. Now, what I want to achieve is create fade-out and fade-in effects in each of the 3 segments of the video... However, when I add the FadeIO2 command at the end of the script, only the last segment fades out.

Is there an easy way to do what I want ?

My script is this :

Code:
#  PLUGINS
LoadPlugin("c:\PixieDust\LoadPluginEx.dll")
LoadPlugin("E:\GORDIA~1\Msharpen.dll")
LoadPlugin("c:\PixieDust\dustv5.dll")
LoadPlugin("E:\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("E:\GORDIA~1\undot.dll")
LoadPlugin("E:\GORDIA~1\decomb.dll")
LoadPlugin("E:\GORDIA~1\KernelDeInt.dll")
#LoadPlugin("E:\GORDIA~1\dgbob.dll")
#LoadPlugin("E:\GORDIA~1\Convolution3d.dll")
#LoadPlugin("E:\GORDIA~1\FluxSmooth.dll")
#LoadPlugin("E:\GORDIA~1\TomsMoComp.dll")
#LoadPlugin("E:\GORDIA~1\VSFilter.dll")
#LoadPlugin("E:\GORDIA~1\SimpleResize.dll")

Avisource("f:\capture-huffy.avi")

Trim(22,72735) ++ Trim(73473,146131) ++ Trim(146304,148783)

#  DEINTERLACING (2)
KernelDeint(order=1)

#CROPPING
Crop(18,12,-14,-12)

#DENOISE
PixieDust(5)

#SHARPEN
MSharpen()

#RESIZING
LanczosResize(640,480)
Any help would be much appreciated.

Thanks in advance.

P.S. : The avi file also has audio which I want to keep, so will adding 3 fade-ins and outs make the audio go off synch ?
iparout is offline   Reply With Quote
Old 18th October 2005, 23:23   #2  |  Link
gzarkadas
Registered User
 
gzarkadas's Avatar
 
Join Date: Sep 2005
Location: 100011110010001000001 10000011111111000001
Posts: 221
Quote:
Originally Posted by iparout
...Now, what I want to achieve is create fade-out and fade-in effects in each of the 3 segments of the video... However, when I add the FadeIO2 command at the end of the script, only the last segment fades out.
...
Code:
#  PLUGINS
...
Trim(22,72735) ++ Trim(73473,146131) ++ Trim(146304,148783)
...
...
P.S. : The avi file also has audio which I want to keep, so will adding 3 fade-ins and outs make the audio go off synch ?
The line above in your code creates a single clip from the three. Adding FadeIO at the end of the script only fades at the limits of the (now) single clip; so it doesn't work as you want in any case.

So you will have to try in your script the following instead of the above line (this will also keep audio in sync):
Code:
ff = {enter the number of frames you want to fade}
audio = Trim(22,72735) ++ Trim(73473,146131) ++ Trim(146304,148783)
video = Trim(22,72735).FadeIO0(ff) ++ Trim(73473,146131).FadeIO0(ff) ++ Trim(146304,148783).FadeIO0(ff)
AudioDub(video, audio)
Now, if you really want the 2 extra black frames at the end add this line after the above (last function ensures the two frames are silent):
Code:
last + BlankClip(last).Trim(0, -2).AmplifydB(-30)
__________________
AVSLib, a free extension library for Avisynth. Current version: 1.1.0 (beta), 14/05/2007.
[ Home page | Download page ]
gzarkadas is offline   Reply With Quote
Old 19th October 2005, 00:38   #3  |  Link
iparout
Registered User
 
Join Date: Aug 2002
Location: Greece
Posts: 403
It works...

Thanks a lot.
iparout is offline   Reply With Quote
Old 19th October 2005, 01:13   #4  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Quote:
Originally Posted by gzarkadas
Now, if you really want the 2 extra black frames at the end add this line after the above (last function ensures the two frames are silent):
Code:
last + BlankClip(last).Trim(0, -2).AmplifydB(-30)
Just do:
Code:
last + BlankClip(last, length=2)
Amplify/AmplifyDB shouldn't be necessary; BlankClip always should generate silent clips.
stickboy 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 01:56.


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