Even though AviSynth is primarily a video editing tool, some basic audio editing filters are also available.
SSRC(clip Clip, int samplerate, bool fast)
|Clip||Clip||last||Clip to resample audio from|
|fast||Boolean||True||Perform faster/less accurate conversion|
SSRC can resample the audio in a clip. It's particularly useful for either converting between the two most common sample formats, CD's 44100Hz and DVD's 48000Hz. It can also be used to make audio streams which have been resampled with AssumeFPS back to standard (destination-compliant) sampling.
Standard samplerates are 44100 for CD/VCD and 48000 for DVD and DTV.
With Fast on it will take less time for SSRC to convert your samplerate, but the resulting quality will be lower. In most cases you should set it to False.
Example CodeResample from VCD to DVD:
V = Mpeg2Source(VCD_Video.d2v)
A = DirectShowSource("VCD_Audio.mpa")
Resample after stretching audio with AssumeFPS:
AssumeFPS(25, sync_audio=True).SSRC(48000, fast=False)
When To Use ItWhen you either have an odd samplerate like what AssumeFPS gives you or an audio stream sampled for a different spec, SSRC will usually be able to resample for you. It's particularly useful for standards conversion (PAL to NTSC or NTSC to PAL)
Written by: Rich Fiscus