Log in

View Full Version : Avisynth AudioFade?


AlanHK
25th November 2009, 10:29
I'd like to fade audio in and out, but not the video.

I made a script function:
function AudioFadeOut(clip input, int "num_frames")
{
FadeOut0(input,num_frames)
return AudioDub(input,last)
}
Which works, but seems a bit silly to process the video then throw it away.

Is there an audio-only fade that does this?

Gavino
25th November 2009, 14:40
The way Avisynth works, the video will not be 'processed'.
Video and audio are processed separately (and only on demand), and since the video part of the FadeOut0 is not used, no video frames will ever be fetched from it.

AlanHK
25th November 2009, 16:49
The way Avisynth works, the video will not be 'processed'.

Admirable design.

So I can use my function without guilt.

*But still, it seems something basic enough to be an internal filter.

Gavino
25th November 2009, 17:32
Yes, no need to feel guilty. :)
But still, it seems something basic enough to be an internal filter.
Agreed, especially since it works in terms of frames, rather than audio samples (or milliseconds, etc), which makes it awkward to use with an audio-only clip. The same goes for Trim().