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:
http://avisynth.nl/index.php/Fade
However, I found a function elsewhere on this forum:
function AudioFadeOut(clip input, int "num_frames")
{
num_frames = Default(num_frames,50)
FadeOut0(input,num_frames)
FadeOut0(last,num_frames)
FadeOut0(last,num_frames)
FadeOut0(last,num_frames)
return AudioDub(input,last)
}
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.
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 10 of 10
Thread
-
-
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). -
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 11:40. Reason: new link
-
Similar Threads
-
FFMPEG - fade in logo independent of fade in video and subtitles
By EasyFeet in forum EditingReplies: 2Last Post: 16th May 2017, 00:59 -
potplayer - how to get rid of audio fade in at start of each video?
By freesolo in forum Software PlayingReplies: 2Last Post: 2nd Jun 2016, 03:24 -
Audio fade after 15 minutes
By RexBuster in forum AudioReplies: 5Last Post: 29th Oct 2015, 16:23 -
How to Fade In/Fade Out Audio Clips in VSDC Free Video Editor?
By BSquared18 in forum EditingReplies: 15Last Post: 6th Mar 2015, 21:44 -
Any free video editing software that does audio fade in/out?
By Juror No. 8 in forum EditingReplies: 3Last Post: 27th Jul 2013, 01:50