• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.Dd November 2, 2014
2.Dt SNDFILE-CONVERT 1
3.Os
4.Sh NAME
5.Nm sndfile-convert
6.Nd convert sound files from one format to another
7.Sh SYNOPSIS
8.Nm sndfile-convert
9.Op Fl override-sample-rate Ns = Ns Ar rate
10.Op Fl endian Ns = Ns Cm little | big | cpu
11.Op Fl normalize
12.Op Ar encoding
13.Ar input
14.Ar output
15.Sh DESCRIPTION
16.Nm
17converts sound files from one audio format to another.
18The output file is overwritten it it already exists.
19.Ss Formats
20The format of the output file is determined by the filename extension.
21The following file formats are currently recognized:
22.Pp
23.Bl -tag -compact -width ircam
24.It wav
25WAV (Microsoft)
26.It aif
27AIFF (Apple/SGI)
28.It au
29AU (Sun/NeXT)
30.It snd
31AU (Sun/NeXT)
32.It raw
33RAW (header-less)
34.It gsm
35RAW (header-less)
36.It vox
37RAW (header-less)
38.It paf
39PAF (Ensoniq PARIS, big-endian)
40.It fap
41PAF (Ensoniq PARIS, little-endian)
42.It svx
43IFF (Amiga IFF/SVX8/SV16)
44.It nist
45SPHERE (NIST SPeech HEader Resources)
46.It sph
47SPHERE (NIST SPeech HEader Resources)
48.It voc
49VOC (Creative Labs)
50.It ircam
51SF (Berkeley/IRCAM/CARL)
52.It sf
53SF (Berkeley/IRCAM/CARL)
54.It w64
55W64 (SoundFoundry WAVE 64)
56.It mat
57MAT4 (GNU Octave 2.0 / Matlab 4.2)
58.It mat4
59MAT4 (GNU Octave 2.0 / Matlab 4.2)
60.It mat5
61MAT5 (GNU Octave 2.1 / Matlab 5.0)
62.It pvf
63PVF (Portable Voice Format)
64.It xi
65XI (FastTracker 2)
66.It htk
67HTK (HMM Tool Kit)
68.It sds
69SDS (Midi Sample Dump Standard)
70.It avr
71AVR (Audio Visual Research)
72.It wavex
73WAVEX (MS WAVE with WAVEFORMATEX)
74.It sd2
75SD2 (Sound Designer II)
76.It flac
77FLAC (FLAC Lossless Audio Codec)
78.It caf
79CAF (Apple Core Audio File)
80.It wve
81WVE (Psion Series 3)
82.It prc
83WVE (Psion Series 3)
84.It ogg
85OGG (OGG Container format)
86.It oga
87OGG (OGG Container format)
88.It mpc
89MPC (Akai MPC 2k)
90.It rf64
91RF64 (RIFF 64)
92.El
93.Ss Options
94The following options are recoginzed:
95.Pp
96.Bl -tag -compact -width "override-sample-rate=XXXXX"
97.It Fl override-sample-rate Ns = Ns Ar rate
98Make the input use sample rate of
99.Ar rate
100Hz.
101.It Fl endian Ns = Ns Cm little
102Make the output file use little endian data.
103.It Fl endian Ns = Ns Cm big
104Make the output file use big endian data.
105.It Fl endian Ns = Ns Cm cpu
106Make the output file use CPU endianness.
107.It Fl normalize
108Normalize the audio data in the output file.
109.El
110.Ss Encodings
111The optional
112.Ar encoding
113parameter allows setting of the data encoding for the output file.
114The following encodings are currently supported:
115.Pp
116.Bl -tag -compact -width ima-adpcmXX
117.It Fl pcms8
118signed 8 bit pcm
119.It Fl pcmu8
120unsigned 8 bit pcm
121.It Fl pcm16
12216 bit pcm
123.It Fl pcm24
12424 bit pcm
125.It Fl pcm32
12632 bit pcm
127.It Fl float32
12832 bit floating point
129.It Fl ulaw
130ULAW
131.It Fl alaw
132ALAW
133.It Fl ima-adpcm
134IMA ADPCM (WAV only)
135.It Fl ms-adpcm
136MS ADPCM (WAV only)
137.It Fl gsm610
138GSM6.10 (WAV only)
139.It Fl dwvw12
14012 bit DWVW (AIFF only)
141.It Fl dwvw16
14216 bit DWVW (AIFF only)
143.It Fl dwvw24
14424 bit DWVW (AIFF only)
145.It Fl vorbis
146Vorbis (OGG only)
147.El
148.Pp
149If no encoding is specified for the output file,
150.Nm
151will try to use the encoding of the input file.
152This will not always work as most container formats
153(e.g. WAV, AIFF etc) only support a small subset of encodings
154(e.g. 16 bit PCM, a-law, Vorbis etc).
155.Sh EXIT STATUS
156.Ex -std
157.Sh SEE ALSO
158.Lk http://libsndfile.github.io/libsndfile/
159.Sh AUTHORS
160.An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com .
161