File: inputs.html

package info (click to toggle)
ices2 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,224 kB
  • sloc: sh: 11,327; ansic: 7,361; xml: 162; makefile: 100
file content (321 lines) | stat: -rw-r--r-- 12,774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>IceS v2.0 Documentation</title>
  <link rel="STYLESHEET" type="text/css" href="style.css">
 </head>
 <body>
  <div class=boxtest>
   <h1>Available input modules</h1>
   <table width="100%"><tr><td bgcolor="#007B79" height="10" align="center"></td></tr></table>
   <p>
    Several input modules are available, depending on the platform, drivers
    and libraries available.  The general layout is defined as 
   </p>
   <pre>
    &lt;input&gt;
	&lt;module&gt;module name&lt;/module&gt;
	&lt;param name="name1"&gt;value&lt;/param&gt;
	&lt;param name="name2"&gt;value&lt;/param&gt;
	&lt;param name="name3"&gt;value&lt;/param&gt;
    &lt;/input&gt;
   </pre>
   <p>
    For live input you may want to look into various resources on the web for
    information on sound input. You may find that ALSA for instance supports
    a particular soundcard better than the Open Sound System.
   </p>
   <h2>Open Sound</h2>
   <pre>
	&lt;module&gt;oss&lt;/module&gt;
	&lt;param name="rate"&gt;44100&lt;/param&gt;
	&lt;param name="channels"&gt;2&lt;/param&gt;
	&lt;param name="device"&gt;/dev/dsp&lt;/param&gt;
	&lt;param name="metadata"&gt;1&lt;/param&gt;
	&lt;param name="metadatafilename"&gt;/home/ices/metadata&lt;/param&gt;
   </pre>
   <p>
    This module is for reading live input from the Open Sound System drivers,
    often found on linux systems but are available on others. This will read audio
    from the DSP device in a format specified in the parameters provided.
   </p>
   <p>
    The following can be used to configure the module
   </p>
   <h4>rate</h4>
   <div class=indentedbox>
    The value is in hertz, 44100 is the samplerate used on CD's, but some drivers
    may prefer 48000 (DAT) or you may want to use something lower.
   </div>
   <h4>channels</h4>
   <div class=indentedbox>
    The number of channels to record. This is typically 2 for stereo or 1 for mono
   </div>
   <h4>device</h4>
   <div class=indentedbox>
    The device to read the audio samples from, it's typically /dev/dsp but
    there maybe more than one card installed.
   </div>
   <h4>metadata</h4>
   <div class=indentedbox>
    Check for metadata arriving, if any are present then the data is marked
    for an update. The metadata is in the form of tag=value, and while Ogg
    Vorbis can handle any supplied tags, most players will only do anything
    with artist and title.
   </div>
   <h4>metadatafilename</h4>
   <div class=indentedbox>
    <p>
     The name of the file to open and read the metadata tags from, with this
     parameter missing standard input is read. Using a file is often the better
     approach. When using the file access the procedure is usually to populate
     the file contents then send a SIGUSR1 to the IceS process.
    </p>
    <p>
     The format of the file itself is a simple one comment per line format,
     below is a trivial example of the file, other tags can be used but players
     tend to only look for artist and title for displaying. The data must be in 
     UTF-8 (this is not checked by ices, however).
    </p>
   </div>
   <pre>
    artist=Queen
    title=We Will Rock You
   </pre>

   <h2>ALSA</h2>
   <p>
    The Advanced Linux Sound Architecture (ALSA) is a completely different
    sound system on linux but provides OSS compatability so the OSS driver
    should work with it as well. To use ALSA natively a separate module is used
   </p>
   <pre>
	&lt;module&gt;alsa&lt;/module&gt;
	&lt;param name="rate"&gt;44100&lt;/param&gt;
	&lt;param name="channels"&gt;2&lt;/param&gt;
	&lt;param name="device"&gt;hw:0,0&lt;/param&gt;
	&lt;param name="periods"&gt;2&lt;/param&gt;
	&lt;param name="buffer-time"&gt;500&lt;/param&gt;
	&lt;param name="metadata"&gt;1&lt;/param&gt;
	&lt;param name="metadatafilename"&gt;/home/ices/metadata&lt;/param&gt;
   </pre>
   The parameters to ALSA are mostly the same for OSS, as it performs the same
   task, ie captures audio from the DSP.

   <h4>device</h4>
   <div class=indentedbox>
    <p>This is the device name as used in ALSA. This can be a physical device
    as in the case of "hw:0,0" or a virtual device like one with dsnoop.</p>
   </div>
   <h4>periods</h4>
   <div class=indentedbox>
    <p>This specifies how many interrupts will be generated (default: 2)</p>
   </div>
   <h4>buffer-time</h4>
   <div class=indentedbox>
    <p>The size of the buffer measured in mS (default 500)</p>
   </div>

   <h2>Sun</h2>
   <p>
    The Sun Solaris DSP input is similar to OSS. It allows for reading from
    a soundcard on a Sun Solaris UNIX. OpenBSD also has a sound driver that
    is similar to solaris and as such should be able to use this module.
   </p>
   <pre>
        &lt;module&gt;sun&lt;/module&gt;
   </pre>
   <p>
    The parameters are the same as the OSS and ALSA modules.
   </p>
   <h2>StdinPCM</h2>
   <pre>
        &lt;module&gt;stdinpcm&lt;/module&gt;
        &lt;param name="rate"&gt;44100&lt;/param&gt;
        &lt;param name="channels"&gt;2&lt;/param&gt;
        &lt;param name="metadata"&gt;1&lt;/param&gt;
        &lt;param name="metadatafilename"&gt;/home/ices/metadata&lt;/param&gt;
   </pre>
   <p>
    This module should always be available, and as you can see the parameters
    are almost the same except for the device. The PCM audio comes from the
    standard input so it can be generated from some external application feeding
    into a pipe.
   </p>
   <p>
    As it's raw PCM being fed in, it's impossible to determine the samplerate
    and channels so make sure the stated parameters match the incoming PCM or
    the audio will be encoded wrongly.
   </p>

   <h2>Playlist</h2>
   <p>
    The playlist module is used to get audio from some pre-encoded Ogg
    Vorbis files.  IceS currently checks to see if the same file gets
    played in succession and skips it, this means that having a playlist
    repeat with only one Ogg file listed won't work.
    The method of file selection is determined by the playlist
    type.  The current types are basic and script.
   </p>

   <h3>Basic / M3U / VCLT</h3>
   <pre>
    &lt;param name="type"&gt;basic&lt;/param&gt;
    &lt;param name="file"&gt;/path/to/playlist&lt;/param&gt;
    &lt;param name="random"&gt;0&lt;/param&gt;
    &lt;param name="once"&gt;0&lt;/param&gt;
    &lt;param name="restart-after-reread"&gt;1&lt;/param&gt;
   </pre>
   <h4>type</h4>
   <div class=indentedbox>
    This is the file format of the playlist.
    Currently "basic", "m3u" and "vclt" are supported.
   </div>
   <h4>file</h4>
   <div class=indentedbox>
    State a path to a file which will contain a list of Ogg Vorbis filenames
    to play.
    The format of this file depends on the setting of "type".
    For type "basic" the format is
    one filename per line with lines beginning with '#' being treated as
    comments.  If a line has a single '-' then standard input is read, which
    provides a way of getting some external Ogg Vorbis stream into ices.
   </div>
   <h4>format</h4>
   <div class=indentedbox>
    This sets the used codec for input files.
    Use "ogg" for generic Ogg handling. In this mode codec specific features
    will not available but codec is detected on the fly.
    Currently "vorbis" and "ogg" are supported.
    By default "vorbis" is used.
   </div>
   <h4>random</h4>
   <div class=indentedbox>
    When set to 1, the playlist will be randomised when the playlist is
    loaded. By default random is off
   </div>
   <h4>once</h4>
   <div class=indentedbox>
    When set to 1, the playlist is gone through once and then ends, this will
    cause ices to exit. By default once is off.
   </div>
   <h4>restart-after-reread</h4>
   <div class=indentedbox>
    If the playlist is re-read mid way through, which may occur if the
    playlist was updated then this will restart at the beginning of the
    playlist. By default it's off.
   </div>
   <h3>Script</h3>
   <pre>
        &lt;param name="type"&gt;script&lt;/param&gt;
        &lt;param name="program"&gt;/path/to/program&lt;/param&gt;
   </pre>
   <h4>Program</h4>
   <div class=indentedbox>
    State a path to a program which when run will write to it's standard
    output a path to an Ogg Vorbis file. The program can be anything from
    an executable to a shell script as long as it starts, writes the
    filename to it's standard output and then exits.
   </div>

   <h2>RoarAudio</h2>
   <p>
    The RoarAudio module is used to get audio from a RoarAudio Sound Server.
    This module supports getting both already encoded and raw audio from the
    sound server. It also allows meta data to be read from the sound server
    or an file the same way the Open Sound module does.
   </p>
   <pre>
        &lt;module&gt;roar&lt;/module&gt;
        &lt;param name="rate"&gt;44100&lt;/param&gt;
        &lt;param name="channels"&gt;stereo&lt;/param&gt;
        &lt;param name="codec"&gt;ogg_vorbis&lt;/param&gt;
        &lt;param name="aiprofile"&gt;default&lt;/param&gt;
        &lt;param name="dir"&gt;monitor&lt;/param&gt;
        &lt;param name="device"&gt;/tmp/roar&lt;/param&gt;
        &lt;param name="server"&gt;home::&lt;/param&gt;
        &lt;param name="metadata"&gt;file&lt;/param&gt;
        &lt;param name="metadatafilename"&gt;/home/ices/metadata&lt;/param&gt;
        &lt;param name="plugin"&gt;helloworld text="Hello ices2 users!"&lt;/param&gt;
   </pre>

   <p>
    The parameters are similar to the of the other modules.
    For the audio parameters (rate, channels, codec) the values from libroar's
    audio info profile "default" are used (normally 44100, 2, pcm_s).
    The following can be used to configure the module:
   </p>

   <h4>rate</h4>
   <div class=indentedbox>
    The value is in hertz, 44100 is the samplerate used on CD's, but some drivers
    may prefer 48000 (DAT) or you may want to use something lower.
    This can also be a symbolic name as supported by libroar.
    Examples include "cd" and "dat".
   </div>
   <h4>channels</h4>
   <div class=indentedbox>
    The number of channels to record. This is typically 2 for stereo or 1 for mono.
    This can also be a symbolic name as supported by libroar.
    Examples include "stereo" and "mono".
   </div>
   <h4>codec</h4>
   <div class=indentedbox>
    The codec to read the audio data in from the sound server.
    Currently the values "default", "pcm_s", "pcm_s_le", "pcm_s_be",
    "ogg_vorbis", "ogg_opus", "ogg_speex", "ogg_flac" and "ogg_general" are supported.
    "default" is an alias for "pcm_s" which itself is an alias to "pcm_s_le" or "pcm_s_be" depending
    on the native byte order of the system. "ogg_general" should not be used.
   </div>
   <h4>aiprofile</h4>
   <div class=indentedbox>
    Use the given audio info profile from libroar.
    By default the profile "default" is used.
    If mixed with rate, channels or codec options the last one set wins.
   </div>

   <h4>dir</h4>
   <div class=indentedbox>
    This is the stream direction. Currently "monitor" and "record" are supported.
    If set to "monitor" ices2 will stream a copy of the audio played back by
    sound server to icecast. If set to "record" it will read from soundcard input (e.g. mic).
    Defaults to "monitor".
   </div>

   <h4>device, server</h4>
   <div class=indentedbox>
    This sets the location of the sound server. Both parameters are equal.
    The location can be in any form libroar understands.
    Common values are server addresses in form "/path/to/sock" for UNIX sockets,
    "hostname" for IPv4 and IPv6 hosts and "node::" for DECnet nodes.
    A full description of this can be found in the RoarAudio documentation.
    Defaults to the list of default locations (auto detection) libroar has.
   </div>

   <h4>metadata</h4>
   <div class=indentedbox>
    This is the meta data source. Currently supported values are "none", "file" and "stream".
    The values "none" and "file" are the same as for the Open Sound module the values "0" and "1".
    The value "stream" requests meta data from the sound server.
    Defaults to "stream".
   </div>

   <h4>metadatafilename</h4>
   <div class=indentedbox>
    This setting is the same as "metadatafilename" for the Open Sound module.
    It is only active when "metadata" is set to "file".
   </div>

   <h4>plugin</h4>
   <div class=indentedbox>
    This setting loads a plugin. The plugin name my be followed by parameters
    to be passed to the plugin. Between the plugin name and the parameters needs to be a space.
    Normal libroar plugin parameter parsing rules apply
    (keys and values separated by "=", key-value-pairs separated by ",").
   </div>

  </div>
 </body>
</html>