VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. 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.
    Quote Quote  
  2. If you want a linear fade call FadeOut0() only once.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Here's an image of audio faded over 5 frames with FadeOut0(5):

    Click image for larger version

Name:	single.png
Views:	133
Size:	11.0 KB
ID:	41789

    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:

    Click image for larger version

Name:	four.png
Views:	124
Size:	6.8 KB
ID:	41790
    Quote Quote  
  5. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    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).
    Quote Quote  
  6. Thanks guys. I much prefer my linear fade...
    Quote Quote  
  7. 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
    Quote Quote  
  8. Looks like a lot of work went into that, raffriff42...
    Quote Quote  
  9. Originally Posted by pooksahib View Post
    Looks like a lot of work went into that, raffriff42...
    Yeah, no doubt. It was a fun little project.
    Quote Quote  
  10. Anonymous344
    Guest
    Thanks, raffriff42! This thread is related and might interest you.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!