chiark / gitweb /
expand streaming instructions
[disorder] / README.streams
... / ...
CommitLineData
1* Introduction
2
3This file describes DisOrder's relationship to various things that get called
4'streams'.
5
6* RTP Streaming
7
8DisOrder is capable to transmitting RTP streams over a suitable network.
9
10** Server Setup
11
12To enable this make sure that all players use the speaker process, i.e. execraw
13rather than exec (or it won't work properly) and configure the network speaker
14backend:
15
16 speaker_backend network
17 broadcast 172.17.207.255 9003
18 broadcast_from 172.17.207.2 9002
19
20The 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
25The source address (broadcast_from) is optional but may be convenient in som
26ecases.
27
28If the destination is a multicast address then you should set the TTL, for
29instance:
30
31 multicast_ttl 10
32
33** Playing The Stream
34
35To play, use the disorder-playrtp client. If the destination address was a
36unicast or broadcast address then:
37
38 disorder-playrtp 0.0.0.0 9003
39
40If the destination address was a multicast address then you must specify that,
41for instance:
42
43 disorder-playrtp 224.2.3.4 9003
44
45If the client machine has a DisOrder configuration file allowing disorder(1) to
46connect to the server then the parameters are unnecessary: disorder-playrtp
47will figure out the details automatically.
48
49** Disobedience
50
51Disobedience is capable of running disorder-playrtp in the background (provided
52it is installed); look for the speaker icon. If it detects that the server is
53using network play then its volume control will apply to the local volume, not
54the server's volume.
55
56If you run into trouble look for *.log files in ~/.disorder.
57
58** Limitations
59
60Currently only 16-bit 44100Hz stereo is supported, which requires about
611.4Mbit/s. At the time of writing I've found this to work fine on 100Mbit/s
62ethernet and had reports of success with 10Mbit/s ethernet, but have not had
63any success with wireless.
64
65Possibly other lower-quality but lower-bandwidth encodings will be supported in
66future.
67
68If you have a too-recent version of sox you may need to set the sox_generation
69option. See disorder_config(5).
70
71
72* Icecast Streaming
73
74This can be achieved using the speaker_command option and Icecast (see
75http://www.icecast.org/). It will only work if you use the speaker process,
76i.e. execraw for everything.
77
78I used:
79
80 speaker_command "ices2 /etc/disorder/ices.xml"
81
82where 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
123This doesn't seem to get on very well with pausing but you're unlikely to want
124to pause a stream in any case. I used IceCast 2.3.1 and Ices 2.0.1. You can
125play the stream with XMMS or whatever. The total setup seems to play rather
126behind the 'current' time, watch this space for a fix (or contribute one!)
127
128If you have a too-recent version of sox you may need to set the sox_generation
129option.
130
131
132* DisOrder and Republishing Internet Streams
133
134DisOrder doesn't have any built-in support for playing streams but you can make
135it 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
140After setting this up you'll need to re-read the config file and provoke a
141rescan:
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
150You'll probably want to prevent random play of streams:
151
152 disorder set /export/radio/CUR1350.oggradio pick_at_random 0
153
154You can then queue a stream like any other track. It won't automatically
155interrupt the playing track, you have to scratch it manually. Go back to
156normal play by scratching the stream.
157
158
159Local Variables:
160mode:outline
161fill-column:79
162End: