
Fade audio in or out
Ramp an audio file's (or a video's audio track's) volume up from silence at the start, down to silence at the end, or both, linear or logarithmic, decoded and re-encoded as WAV through the same PCM path as audio-reverse. WAV decodes everywhere; AAC, MP3, Opus, FLAC and Vorbis need a browser.
Fade audio in or out slides a clip's volume from silence up to full at the start, back down at the end, or both, following a linear or logarithmic curve. Samples decode to PCM, get scaled frame by frame, and encode fresh as WAV. WAV opens everywhere; AAC, MP3, Opus and FLAC need a browser tab to decode.
Questions
What is the difference between the linear and log curve?
Linear ramps the gain in a straight line from silent to full volume. Log rises quickly at first and then levels off, which tends to sound smoother, since human loudness perception is itself roughly logarithmic.
Can I fade in and out at the same time?
Yes. fadeInSec and fadeOutSec are independent, both defaulting to half a second, and either can be set to 0 to skip that end. At least one of the two must be greater than 0.
Does this work on a video file?
Yes, on its audio track. The video itself is not touched by this tool; only the decoded audio samples are faded and written back out as a standalone WAV file.
Why is the output always WAV?
Because the samples are decoded to raw PCM, scaled frame by frame, and re-encoded, and WAV is the format that path writes. Convert audio afterward if you need MP3 or another format.
Why does it need a browser for some files?
WAV decodes in Node as well as the browser, since it carries raw PCM samples. AAC, MP3, Opus and FLAC input need a browser, because those codecs only decode through WebCodecs.