Scroll to navigation

zresample(1) USER COMMANDS zresample(1)

NAME

zresample - resample and change sample format of audio files

SYNOPSIS

zresample [options] input-file output-file

DESCRIPTION

zresample copies an audio file, changing the sample rate and/or the sample format. For 16-bit output it can also dither the audio signal. Input can be any audio file readable by the libsndfile library. The output file type is either WAV, WAVEX, CAF, AIFF or FLAC.

OPTIONS

Display a short help text.
Set the output sample rate. Zresample uses the zita-resampler library which means that not all combinations of input/output sample rate will be accepted. The resample ratio must be a reducable to a fraction a/b with both a and b less than or equal to 1000.
Gain in dB, default zero.

Output file type

Produce a WAV file, or for more than 2 channels, a WAVEX file. This is the default.
Produce a WAVEX file with the Ambisonic GUID. Such files should have the .amb filename extension.
Produce a Core Audio file.
Produce an AIFF file.
Produce a FLAC file.

Output sample format

--16bit
Output sample format is signed 16-bit. This option also enables the use of dithering, described below.
--24bit
Output sample format is 24-bit. This is the default.
Output sample format is 32-bit floating point.

Dithering

Add white dithering noise with a rectangular distribution. This is the best option if the output data is going to processed again, but in that case it would be advisable to use 24-bit or float.
Add filtered noise with a triangular distribution. Compared to the rectangular dither this reduces the noise density in the lower frequency range.
This uses the optimal error feedback filter described by Stanley Lipschitz. This is recommended is the output is the final distribution format, e.g. for a CD.

Timing

Insert zero valued input samples at the start and end so that the output includes the full symmetric filter response even for the first and last samples.

EXIT STATUS

Zero in case there are no errors, non-zero otherwise.

AUTHOR

Fons Adriaensen (fons (at) linuxaudio.org)

May 2010 version 0.0.1