Recognizes if input is ogg or not.
[xiph.git] / vorbis-tools / ogg123 / ogg123.1
blobff6f450a4708c6e65a0d087b8db1435147dc7a70
1 .\" Process this file with
2 .\" groff -man -Tascii ogg123.1
3 .\"
4 .TH ogg123 1 "2003 September 1" "Xiph.Org Foundation" "Vorbis Tools"
6 .SH NAME
7 ogg123 \- plays Ogg Vorbis files
9 .SH SYNOPSIS
10 .B ogg123 
12 .B -vqrzZVh
13 ] [
14 .B -k
15 .I seconds 
16 ] [
17 .B -x
18 .I nth
19 ] [
20 .B -y
21 .I ntimes
22 ] [
23 .B -b
24 .I buffer_size 
25 ] [
26 .B -d
27 .I driver 
29 .B -o
30 .I option:value
31
33 .B -f
34 .I filename
35 ] ]
36 .I file
37 .B ...
39 .I directory
40 .B ...
42 .I URL
43 .B ...
45 .SH DESCRIPTION
46 .B ogg123
47 reads Ogg Vorbis audio files and decodes them to the devices specified
48 on the command line.  By default,
49 .B ogg123
50 writes to the standard sound device, but output can be sent to any
51 number of devices.  Files can be read from the file system, or URLs
52 can be streamed via HTTP.  If a directory is given, all of the files in
53 it or its subdirectories will be played.
55 .SH OPTIONS
56 .IP "--audio-buffer n"
57 Use an output audio buffer of approximately 'n' kilobytes.
58 .IP "-@ playlist, --list playlist"
59 Play all of the files named in the file 'playlist'.  The playlist should have
60 one filename, directory name, or URL per line.  Blank lines are permitted.
61 Directories will be treated in the same way as on the command line.
62 .IP "-b n, --buffer n"
63 Use an input buffer of approximately 'n' kilobytes.  HTTP-only option.
64 .IP "-p n, --prebuffer n"
65 Prebuffer 'n' percent of the input buffer.  Playback won't begin until
66 this prebuffer is complete.  HTTP-only option.
67 .IP "-d device, --device device"
68 Specify output device.  See
69 .B DEVICES
70 section for a list of devices.  Any number of devices may be specified.
71 .IP "-f filename, --file filename"
72 Specify output file for file devices.  The filename "-" writes to standard
73 out.  If the file already exists,
74 .B ogg123
75 will overwrite it.
76 .IP "-h, --help"
77 Show command help.
78 .IP "-k n, --skip n"
79 Skip the first 'n' seconds.  'n' may also be in minutes:seconds or 
80 hours:minutes:seconds form.
81 .IP "-K n, --end n"
82 Stops playing 'n' seconds from the start of the stream.  'n' may also have the
83 same format as used in the
84 .I --skip
85 option.
86 .IP "-o option:value, --device-option option:value"
87 Assigns the option
88 .I option
89 to 
90 .I value
91 for the preceding device.  See
92 .B DEVICES
93 for a list of valid options for each device.
94 .IP "-q, --quiet"
95 Quiet mode.  No messages are displayed.
96 .IP "-V, --version"
97 Display version information.
98 .IP "-v, --verbose"
99 Increase verbosity.
100 .IP "-x n, --nth"
101 Play every 'n'th decoded block.  Has the effect of playing audio at 'n' times
102 faster than normal speed.
103 .IP "-y n, --ntimes"
104 Repeat every played block 'n' times.  Has the effect of playing audio 'n'
105 times slower than normal speed.  May be with -x for interesting fractional
106 speeds.
107 .IP "-r, --repeat"
108 Repeat playlist indefinitely.
109 .IP "-z, --shuffle"
110 Play files in pseudo-random order.
111 .IP "-Z, --random"
112 Play files in pseudo-random order forever.
114 .SH DEVICES
116 .B ogg123
117 supports a variety of audio output devices through libao.  Only those
118 devices supported by the target platform will be available.  The
119 .B -f
120 option may only be used with devices that write to files.
122 .IP null
123 Null driver.  All audio data is discarded.  (Note: Audio data is not
124 written to 
125 .B /dev/null
126 !)  You could use this driver to test raw decoding speed without
127 output overhead. 
129 .IP alsa
130 Advanced Linux Sound Architecture.
132 Options:
134 .IP dev
135 ALSA device label to use. The system default is used by default.
136 Examples include "plughw:0,0" for the first soundcard, and "plughw:1,0" for
137 the second. For more information, see
138 http://alsa.opensrc.org/ALSA+device+labels
139 .IP buf_size
140 Override the default buffer size (in bytes).
144 .IP arts
145 aRts Sound Daemon.
147 .IP esd
148 Enlightened Sound Daemon.
150 Options:
152 .IP host
153 The hostname where esd is running.  This can include a port number
154 after a colon, as in "whizbang.com:555".  (Default = localhost)
158 .IP irix
159 IRIX audio driver.
161 .IP oss
162 Open Sound System driver for Linux and FreeBSD.
164 Options:
165 .RS 
166 .IP dsp
167 DSP device for soundcard.  Defaults to  
168 .B /dev/dsp.
172 .IP sun
173 Sun Audio driver for NetBSD, OpenBSD, and Solaris.
175 Options:
177 .IP dev
178 Audio device for soundcard.  Defaults to  
179 .B /dev/audio.
183 .IP au
184 Sun audio file output.  Writes the audio samples in AU format.  The AU
185 format supports writing to unseekable files, like standard out.  In
186 such circumstances, the AU header will specify the sample format, but
187 not the length of the recording.
189 .IP raw
190 Raw sample output.  Writes raw audio samples to a file.
192 Options:
194 .IP byteorder
195 Choose big endian, little endian, or native byte order.  (Default = "native")
199 .IP wav
200 WAV file output.  Writes the sound data to disk in uncompressed form.
201 If multiple files are played, all of them will be concatenated into
202 the same WAV file.  WAV files cannot be written to unseekable files,
203 such as standard out.  Use the AU format instead.
206 .SH EXAMPLES
209 .B ogg123
210 command line is fairly flexible, perhaps confusingly so.  Here are
211 some sample command lines and an explanation of what they do.
214 Play on the default soundcard:
216 .B ogg123 test.ogg
220 Play all of the files in the directory ~/music and its subdirectories.
222 .B ogg123 ~/music
226 Play a file using the OSS driver:
228 .B ogg123 -d oss test.ogg
232 Pass the "dsp" option to the OSS driver: 
234 .B ogg123 -d oss -o dsp:/dev/mydsp 
238 Use the ESD driver
240 .B ogg123 -d esd test.ogg
244 Use the WAV driver with the output file, "test.wav":
246 .B ogg123 -d wav -f test.wav test.ogg
250 Listen to a file while you write it to a WAV file:
252 .B ogg123 -d oss -d wav -f test.wav test.ogg
256 Note that options apply to the device declared to the left:
258 .B ogg123 -d oss -o dsp:/dev/mydsp -d raw -f test2.raw -o byteorder:big test.ogg
262 Stress test your harddrive:
264 .B ogg123 -d oss -d wav -f 1.wav -d wav -f 2.wav -d wav -f 3.wav -d wav -f 4.wav -d wav -f 5.wav  test.ogg
268 Create an echo effect with esd and a slow computer:
270 .B ogg123 -d esd -d esd test.ogg
274 .SH INTERRUPT
275 You can abort
276 .B ogg123
277 at any time by pressing Ctrl-C.  If you are playing multiple
278 files, this will stop the current file and begin playing the
279 next one.  If you want to abort playing immediately instead
280 of skipping to the next file, press Ctrl-C within the first
281 second of the playback of a new file.
283 Note that the result of pressing Ctrl-C might not be audible
284 immediately, due to audio data buffering in the audio device.
285 This delay is system dependent, but it is usually not more
286 than one or two seconds.
288 .SH FILES
291 /etc/libao.conf
292 Can be used to set the default output device for all libao programs.
295 ~/.libao
296 Per-user config file to override the system wide output device settings.
299 .SH BUGS
301 Piped WAV files may cause strange behavior in other programs.  This is
302 because WAV files store the data length in the header.  However, the
303 output driver does not know the length when it writes the header, and
304 there is no value that means "length unknown".  Use the raw or au
305 output driver if you need to use ogg123 in a pipe.
307 .SH AUTHORS
310 Program Authors:
312 Kenneth Arnold <kcarnold-xiph@arnoldnet.net>
314 Stan Seibert <volsung@xiph.org>
318 Manpage Author:
320 Stan Seibert <volsung@xiph.org>
322 .SH "SEE ALSO"
325 \fBlibao.conf\fR(5), \fBoggenc\fR(1), \fBvorbiscomment\fR(1), \fBogginfo\fR(1)