chiark / gitweb /
totally untested multicast support
[disorder] / README.streams
1 DisOrder and Republishing Internet Streams
2 ==========================================
3
4 DisOrder doesn't have any built-in support for playing streams but you can make
5 it do so.  I use the following in my configuration file:
6
7  player /export/radio/*.oggradio shell 'xargs ogg123 -q < "$TRACK"'
8  collection fs iso-8859-1 /export/radio
9
10 After setting this up you'll need to re-read the config file and provoke a
11 rescan:
12
13   disorder reconfigure rescan /export/radio
14
15 /export/radio contains a file for each stream, containing the URL to use:
16
17  lyonesse$ cat /export/radio/CUR1350.oggradio
18  http://cur.chu.cam.ac.uk:8000/cur.ogg
19
20 You'll probably want to prevent random play of streams:
21
22  disorder set /export/radio/CUR1350.oggradio pick_at_random 0
23
24 You can then queue a stream like any other track.  It won't automatically
25 interrupt the playing track, you have to scratch it manually.  Go back to
26 normal play by scratching the stream.
27
28
29 RTP Streaming
30 =============
31
32 DisOrder is now capable to transmitting RTP streams over a suitable network.
33 To enable this make sure that allplayers use the speaker process, i.e. execraw
34 rather than exec (or it won't work properly) and configure the network speaker
35 backend:
36
37     speaker_backend network
38     broadcast 172.17.207.255 9003
39     broadcast_from 172.17.207.2 9002
40
41 broadcast_from is optional but may be convenient for some cases.
42
43 To play, use the disorder-playrtp client.
44
45    disorder-playrtp 0.0.0.0 9003
46
47 Currently only 16-bit 44100Hz stereo is supported, which requires about
48 1.4Mbit/s.  Possibly other lower-quality but lower-bandwidth encodings will be
49 supported in future.
50
51 If you have a too-recent version of sox you may need to set the sox_generation
52 option.
53
54
55 Icecast Streaming
56 =================
57
58 This can be achieved using the speaker_command option and Icecast (see
59 http://www.icecast.org/).  It will only work if you use the speaker process,
60 i.e. execraw for everything.
61
62 I used:
63
64   speaker_command "ices2 /etc/disorder/ices.xml"
65
66 where ices.xml is:
67
68   <?xml version="1.0"?>
69   <ices>
70       <background>0</background>
71       <logpath>/var/log/ices</logpath>
72       <logfile>disorder.log</logfile>
73       <loglevel>4</loglevel>
74       <consolelog>0</consolelog>
75       <stream>
76           <metadata>
77               <name>lyonesse</name>
78               <genre>Various</genre>
79               <description>lyonesse disorder output</description>
80           </metadata>
81           <input>
82               <module>stdinpcm</module>
83               <param name="rate">44100</param>
84               <param name="channels">2</param>
85               <param name="metadata">1</param>
86               <param name="metadatafilename">/var/disorder/icedata</param>
87           </input>
88           <instance>
89               <hostname>lyonesse.anjou.terraraq.org.uk</hostname>
90               <port>8000</port>
91               <password>SOURCE PASSWORD HERE</password>
92               <mount>/disorder.ogg</mount>
93               <reconnectdelay>2</reconnectdelay>
94               <reconnectattempts>5</reconnectattempts>
95               <maxqueuelength>80</maxqueuelength>
96               <encode>
97                   <nominal-bitrate>64000</nominal-bitrate>
98                   <samplerate>44100</samplerate>
99                   <channels>2</channels>
100                   <flush-samples>8820</flush-samples>
101               </encode>
102           </instance>
103
104           </stream>
105   </ices>
106
107 This doesn't seem to get on very well with pausing but you're unlikely to want
108 to pause a stream in any case.  I used IceCast 2.3.1 and Ices 2.0.1.  You can
109 play the stream with XMMS or whatever.  The total setup seems to play rather
110 behind the 'current' time, watch this space for a fix (or contribute one!)
111
112 If you have a too-recent version of sox you may need to set the sox_generation
113 option.
114
115
116 Local Variables:
117 mode:text
118 fill-column:79
119 End: