Hi. I've a couple of conversions to do where an audio fadeout would be nice. I thought this would have been fairly easy but apparently not – seems the 'official' fadeout method also affects the video which is not what I want:
However, I found a function elsewhere on this forum:
function AudioFadeOut(clip input, int "num_frames")
num_frames = Default(num_frames,50)
and it works but not, in my experience, perfectly. Instead of fading to the end, it leaves a few seconds of silence at the end of the new video i.e. it fades to silence too early. Does anyone know of a method for achieving true 'fade to end' of the audio? Thank you.
+ Reply to Thread
Results 1 to 10 of 10
If you want a linear fade call FadeOut0() only once.
Perfect, thanks so much jagabo. The chap who wrote that function said of it "Note that I do repeated fades, as I want to have a very steep fade." I wonder why he just doesn't change the default, as I did, from 50 to 200 which gives me an 8 second fade. Thanks again, you're a pal.
Here's an image of audio faded over 5 frames with FadeOut0(5):
As you can see it fades linearly from full amplitude at the left, to zero amplitude at the right (before the fade it was full amplitude across the entire image). But after four consecutive FadeOut0(5) you get a much steeper drop at the start:
Yes, I remember, overlaying several fades produces an effect like a logarithmical fade which is closer to the subjective loudness impression.
Linear: 100% - 80% - 60% - 40% - 20% - 0%
Logarithmic: 1 - 1/2 - 1/4 - 1/8 - 1/16 - 1/32
Multiple linear fading is not the same as logarithmic. But try 2 or 3 instead if 4 were too steep. Until maybe someone creates other non-linear volume change functions for AviSynth (I doubt Animate("AmplifydB") will work well on the audio part, due to video frame granularity).
Thanks guys. I much prefer my linear fade...
If anybody's interested, I hacked up the four main types of fadeout --
(I say "hacked" because they are piecewise approximations, not true curves, but they seem to work alright)
They're mainly for audio, but you can fade video only, audio-only, or both. Fade to black or any other color.
Script is here (dropbox)
Linear (the normal Avisynth fade):
Exponential (fast at first, then a long fadeout):
Studio (slow, medium, slow):
Logrithmic (slow, fast):
EDIT - an example:Code:
Fade_stu(1999, 2029, vfade=false) # afade=true (default) ## "studio" fadeout ## audio fade only ## fade starts at frame 1999 ## fade completed at frame 2029 (30 frames later) ## clip continues silent to the end
Last edited by raffriff42; 4th Jun 2017 at 12:40. Reason: new link
Looks like a lot of work went into that, raffriff42...