]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/audio
paint(1): english
[plan9front.git] / sys / man / 1 / audio
1 .TH AUDIO 1
2 .SH NAME
3 mp3dec, mp3enc, oggdec, oggenc, flacdec, wavdec \- decode and encode audio files
4 .SH SYNOPSIS
5 .B audio/mp3dec
6 [
7 .B -d
8 ]
9 .br
10 .B audio/oggdec
11 .br
12 .B audio/flacdec
13 .br
14 .B audio/wavdec
15 .PP
16 .B audio/oggenc
17 .br
18 .B audio/mp3enc
19 [
20 .B -hprv
21 ] [
22 .B -b
23 .I bitrate
24 ] [
25 .B -B
26 .I bitrate
27 ] [
28 .B -m
29 .I mode
30 ] [
31 .B -q
32 q ] [
33 .B -s
34 .I sfreq
35 ] [
36 .B -V
37 .I q
38 ] [
39 .I "long or silly options"
40 ]
41 .PP
42 .SH DESCRIPTION
43 These programs decode and encode various audio formats from and to
44 16-bit stereo PCM (little endian). The decoders read the compressed
45 audio data from standard input and produce PCM on standard output at
46 a sampling frequency of 44.1KHz.
47 .PP
48 .I Mp3dec
49 decodes MPEG audio (layer 1, 2 and 3). The
50 .B -d
51 option enables debug output to standard error.
52 .I Oggdec,
53 .I flacdec
54 and
55 .I wavdec
56 are like
57 .I mp3dec
58 but decode OGG Vorbis, FLAC lossless audio and PCM Wave.
59 .PP
60 The encoders read PCM on standard input and produce compressed audio
61 on standard output.
62 .I Oggenc
63 and
64 .I mp3enc
65 produce OGG Vorbis and MP3 audio. For
66 .I mp3enc,
67 the MP3 file will use `constant bit-rate' (CBR) encoding by default, 
68 but that can be changed via
69 .B --abr
70 (average bitrate desired, ABR)
71 or
72 .BR -v
73 (variable bitrate, VBR).
74 .SS Options
75 .TF "\fB-b \fP"
76 .TP
77 .B -b
78 set minimum allowed
79 .I bitrate
80 in Kb/s for VBR, default 32Kb/s.
81 For CBR,
82 set the exact bitrate in Kb/s, which defaults to 128Kb/s.
83 .TP
84 .B -B
85 set maximum allowed
86 .I bitrate
87 in Kb/s for VBR, default 256Kb/s.
88 .TP
89 .BI -h
90 same as
91 .LR "-q 2" .
92 .TP
93 .B -m
94 .I mode
95 may be
96 (s)tereo,
97 (j)oint,
98 (f)orce
99 or
100 (m)ono
101 (default j).
102 .B force
103 forces mid/side stereo on all frames.
104 .TP
105 .B -p
106 add CRC error protection (adds an additional 16 bits per frame to the stream).
107 This seems to break playback.
108 .TP
109 .B -q
110 sets output quality to
111 .I q
112 (see
113 .BR -V ).
114 .TP
115 .B -r
116 input is raw pcm
117 .TP
118 .B -s
119 set sampling frequency of input file (in KHz) to
120 .IR sfreq ,
121 default is 44.1.
122 .TP
123 .B -v
124 use variable bitrate (VBR) encoding
125 .TP
126 .B -V
127 set quality setting for VBR to
128 .IR q .
129 Default
130 .I q
131 is 4;
132 0 produces highest-quality and largest files, and
133 9 produces lowest-quality and smallest files.
134 .SS Long options
135 .TF "\fB--resample sfreq \fP"
136 .TP
137 .BI --abr " bitrate"
138 sets average
139 .I bitrate
140 desired in Kb/s, instead of setting quality,
141 and generates ABR encoding.
142 .TP
143 .BI --resample " sfreq"
144 set sampling frequency of output file (in KHz) to
145 .IR sfreq ,
146 default is input sfreq.
147 .TP
148 .BI --mp3input
149 .I input
150 is an MP3 file
151 .
152 .SS Silly options
153 .TF --nohist
154 .TP
155 .BI -f
156 same as
157 .LR "-q 7" .
158 Such a deal. 
159 .TP
160 .BI -o
161 mark as non-original (i.e. do not set the original bit)
162 .TP
163 .BI -c
164 mark as copyright
165 .TP
166 .BI -k
167 disable sfb=21 cutoff
168 .TP
169 .BI -e " emp"
170 de-emphasis n/5/c
171 (default n)
172 .TP
173 .BI -d
174 allow channels to have different blocktypes
175 .TP
176 .BI -t
177 disable Xing VBR informational tag
178 .TP
179 .BI -a
180 autoconvert from stereo to mono file for mono encoding
181 .TP
182 .BI -x
183 force byte-swapping of input (see
184 .IR dd (1)
185 instead)
186 .TP
187 .BI -S
188 don't print progress report, VBR histograms
189 .TP
190 .BI --athonly
191 only use the ATH for masking
192 .TP
193 .BI --nohist
194 disable VBR histogram display
195 .TP
196 .BI --voice
197 experimental voice mode
198 .
199 .SH EXAMPLE
200 Play back an
201 .L .mp3
202 .IP
203 .EX
204 audio/mp3dec <foo.mp3 >/dev/audio
205 .EE
206 .LP
207 Encode a
208 .L .wav
209 file as highest-quality MP3.
210 .IP
211 .EX
212 audio/mp3enc -q 0 -b 320
213 .EE
214 .LP
215 Create a fixed 128Kb/s MP3 file from a
216 .L .wav
217 file.
218 .IP
219 .EX
220 audio/mp3enc -h <foo.wav >foo.mp3
221 .EE
222 .LP
223 Streaming from stereo 44.1KHz raw PCM data, encoding mono at 16KHz
224 (you may not need
225 .IR dd ):
226 .IP
227 .EX
228 dd -conv swab | audio/mp3enc -a -r -m m --resample 16 -b 24
229 .EE
230 .SH SOURCE
231 .B /sys/src/cmd/audio
232 .SH "SEE ALSO"
233 .IR play (1),
234 .IR juke (7),
235 .IR playlistfs (7)
236 .br
237 .B http://www.underbit.com/products/mad/
238 .br
239 .B http://xiph.org/doc/
240 .br
241 .B http://flac.sourceforge.net/documentation.html
242 .SH BUGS
243 It's another GNU behemoth, lightly tamed.