SNDFILE-CONVERT(1) General Commands Manual SNDFILE-CONVERT(1)

# [NAME](#NAME)

`sndfile-convert` — convert sound files from one format to another

# [SYNOPSIS](#SYNOPSIS)

`sndfile-convert` \[`-override-sample-rate`=`rate`] \[`-endian`=`little` | `big` | `cpu`] \[`-normalize`] \[`encoding`] `input` `output`

# [DESCRIPTION](#DESCRIPTION)

`sndfile-convert` converts sound files from one audio format to another. The output file is overwritten it it already exists.

## [Formats](#Formats)

The format of the output file is determined by the filename extension. The following file formats are currently recognized:

wav

WAV (Microsoft)

aif

AIFF (Apple/SGI)

au

AU (Sun/NeXT)

snd

AU (Sun/NeXT)

raw

RAW (header-less)

gsm

RAW (header-less)

vox

RAW (header-less)

paf

PAF (Ensoniq PARIS, big-endian)

fap

PAF (Ensoniq PARIS, little-endian)

svx

IFF (Amiga IFF/SVX8/SV16)

nist

SPHERE (NIST SPeech HEader Resources)

sph

SPHERE (NIST SPeech HEader Resources)

voc

VOC (Creative Labs)

ircam

SF (Berkeley/IRCAM/CARL)

sf

SF (Berkeley/IRCAM/CARL)

w64

W64 (SoundFoundry WAVE 64)

mat

MAT4 (GNU Octave 2.0 / Matlab 4.2)

mat4

MAT4 (GNU Octave 2.0 / Matlab 4.2)

mat5

MAT5 (GNU Octave 2.1 / Matlab 5.0)

pvf

PVF (Portable Voice Format)

xi

XI (FastTracker 2)

htk

HTK (HMM Tool Kit)

sds

SDS (Midi Sample Dump Standard)

avr

AVR (Audio Visual Research)

wavex

WAVEX (MS WAVE with WAVEFORMATEX)

sd2

SD2 (Sound Designer II)

flac

FLAC (FLAC Lossless Audio Codec)

caf

CAF (Apple Core Audio File)

wve

WVE (Psion Series 3)

prc

WVE (Psion Series 3)

ogg

OGG (OGG Container format)

oga

OGG (OGG Container format)

mpc

MPC (Akai MPC 2k)

rf64

RF64 (RIFF 64)

## [Options](#Options)

The following options are recoginzed:

[`-override-sample-rate`](#override-sample-rate)=`rate`

Make the input use sample rate of `rate` Hz.

[`-endian`](#endian)=`little`

Make the output file use little endian data.

[`-endian`](#endian~2)=`big`

Make the output file use big endian data.

[`-endian`](#endian~3)=`cpu`

Make the output file use CPU endianness.

[`-normalize`](#normalize)

Normalize the audio data in the output file.

## [Encodings](#Encodings)

The optional `encoding` parameter allows setting of the data encoding for the output file. The following encodings are currently supported:

[`-pcms8`](#pcms8)

signed 8 bit pcm

[`-pcmu8`](#pcmu8)

unsigned 8 bit pcm

[`-pcm16`](#pcm16)

16 bit pcm

[`-pcm24`](#pcm24)

24 bit pcm

[`-pcm32`](#pcm32)

32 bit pcm

[`-float32`](#float32)

32 bit floating point

[`-ulaw`](#ulaw)

ULAW

[`-alaw`](#alaw)

ALAW

[`-ima-adpcm`](#ima-adpcm)

IMA ADPCM (WAV only)

[`-ms-adpcm`](#ms-adpcm)

MS ADPCM (WAV only)

[`-gsm610`](#gsm610)

GSM6.10 (WAV only)

[`-dwvw12`](#dwvw12)

12 bit DWVW (AIFF only)

[`-dwvw16`](#dwvw16)

16 bit DWVW (AIFF only)

[`-dwvw24`](#dwvw24)

24 bit DWVW (AIFF only)

[`-vorbis`](#vorbis)

Vorbis (OGG only)

If no encoding is specified for the output file, `sndfile-convert` will try to use the encoding of the input file. This will not always work as most container formats (e.g. WAV, AIFF etc) only support a small subset of encodings (e.g. 16 bit PCM, a-law, Vorbis etc).

# [EXIT STATUS](#EXIT_STATUS)

The `sndfile-convert` utility exits 0 on success, and &gt;0 if an error occurs.

# [SEE ALSO](#SEE_ALSO)

[http://libsndfile.github.io/libsndfile/](http://libsndfile.github.io/libsndfile/)

# [AUTHORS](#AUTHORS)

Erik de Castro Lopo &lt;[erikd@mega-nerd.com](mailto:erikd@mega-nerd.com)&gt;.

November 2, 2014 Linux 4.19.0-gvisor

---

Document: sndfile-convert(1) from libsndfile 1.2.2-r5 (Chainguard OS)
Source: https://github.com/libsndfile/libsndfile
