chiark / gitweb /
signame.c test coverage -> 100%
[disorder] / README.streams
1 * Introduction
2
3 This file describes DisOrder's relationship to various things that get called
4 'streams'.
5
6 * RTP Streaming
7
8 DisOrder is capable to transmitting RTP streams over a suitable network.
9
10 ** Server Setup
11
12 To enable this make sure that all players use the speaker process, i.e. execraw
13 rather than exec (or it won't work properly) and configure the network speaker
14 backend:
15
16     speaker_backend network
17     broadcast 172.17.207.255 9003
18     broadcast_from 172.17.207.2 9002
19
20 The destination address (broadcast) can be:
21    - a unicast address if you only want to talk to one client
22    - a broadcast address for a local network
23    - a multicast address
24
25 The source address (broadcast_from) is optional but may be convenient in som
26 ecases.
27
28 If the destination is a multicast address then you should set the TTL, for
29 instance:
30
31    multicast_ttl 10
32
33 ** Playing The Stream
34
35 To play, use the disorder-playrtp client.  If the destination address was a
36 unicast or broadcast address then:
37
38    disorder-playrtp 0.0.0.0 9003
39
40 If the destination address was a multicast address then you must specify that,
41 for instance:
42
43    disorder-playrtp 224.2.3.4 9003
44
45 If the client machine has a DisOrder configuration file allowing disorder(1) to
46 connect to the server then the parameters are unnecessary: disorder-playrtp
47 will figure out the details automatically.
48
49 ** Disobedience
50
51 Disobedience is capable of running disorder-playrtp in the background (provided
52 it is installed); look for the speaker icon.  If it detects that the server is
53 using network play then its volume control will apply to the local volume, not
54 the server's volume.
55
56 If you run into trouble look for *.log files in ~/.disorder.
57
58 ** Limitations
59
60 Currently only 16-bit 44100Hz stereo is supported, which requires about
61 1.4Mbit/s.  At the time of writing I've found this to work fine on 100Mbit/s
62 ethernet and had reports of success with 10Mbit/s ethernet, but have not had
63 any success with wireless.
64
65 Possibly other lower-quality but lower-bandwidth encodings will be supported in
66 future.
67
68 If you have a too-recent version of sox you may need to set the sox_generation
69 option.  See disorder_config(5).
70
71
72 * Icecast Streaming
73
74 This can be achieved using the speaker_command option and Icecast (see
75 http://www.icecast.org/).  It will only work if you use the speaker process,
76 i.e. execraw for everything.
77
78 I used:
79
80   speaker_command "ices2 /etc/disorder/ices.xml"
81
82 where ices.xml is:
83
84   <?xml version="1.0"?>
85   <ices>
86       <background>0</background>
87       <logpath>/var/log/ices</logpath>
88       <logfile>disorder.log</logfile>
89       <loglevel>4</loglevel>
90       <consolelog>0</consolelog>
91       <stream>
92           <metadata>
93               <name>lyonesse</name>
94               <genre>Various</genre>
95               <description>lyonesse disorder output</description>
96           </metadata>
97           <input>
98               <module>stdinpcm</module>
99               <param name="rate">44100</param>
100               <param name="channels">2</param>
101               <param name="metadata">1</param>
102               <param name="metadatafilename">/var/disorder/icedata</param>
103           </input>
104           <instance>
105               <hostname>lyonesse.anjou.terraraq.org.uk</hostname>
106               <port>8000</port>
107               <password>SOURCE PASSWORD HERE</password>
108               <mount>/disorder.ogg</mount>
109               <reconnectdelay>2</reconnectdelay>
110               <reconnectattempts>5</reconnectattempts>
111               <maxqueuelength>80</maxqueuelength>
112               <encode>
113                   <nominal-bitrate>64000</nominal-bitrate>
114                   <samplerate>44100</samplerate>
115                   <channels>2</channels>
116                   <flush-samples>8820</flush-samples>
117               </encode>
118           </instance>
119
120           </stream>
121   </ices>
122
123 This doesn't seem to get on very well with pausing but you're unlikely to want
124 to pause a stream in any case.  I used IceCast 2.3.1 and Ices 2.0.1.  You can
125 play the stream with XMMS or whatever.  The total setup seems to play rather
126 behind the 'current' time, watch this space for a fix (or contribute one!)
127
128 If you have a too-recent version of sox you may need to set the sox_generation
129 option.
130
131
132 * DisOrder and Republishing Internet Streams
133
134 DisOrder doesn't have any built-in support for playing streams but you can make
135 it do so.  I use the following in my configuration file:
136
137  player /export/radio/*.oggradio shell 'xargs ogg123 -q < "$TRACK"'
138  collection fs iso-8859-1 /export/radio
139
140 After setting this up you'll need to re-read the config file and provoke a
141 rescan:
142
143   disorder reconfigure rescan /export/radio
144
145 /export/radio contains a file for each stream, containing the URL to use:
146
147  lyonesse$ cat /export/radio/CUR1350.oggradio
148  http://cur.chu.cam.ac.uk:8000/cur.ogg
149
150 You'll probably want to prevent random play of streams:
151
152  disorder set /export/radio/CUR1350.oggradio pick_at_random 0
153
154 You can then queue a stream like any other track.  It won't automatically
155 interrupt the playing track, you have to scratch it manually.  Go back to
156 normal play by scratching the stream.
157
158
159 Local Variables:
160 mode:outline
161 fill-column:79
162 End: