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