chiark / gitweb /
build fix
[disorder] / README.streams
CommitLineData
1fe9ef21 1DisOrder and Republishing Internet Streams
2==========================================
460b9539 3
4DisOrder doesn't have any built-in support for playing streams but you can make
5it 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
10After setting this up you'll need to re-read the config file and provoke a
11rescan:
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
20You'll probably want to prevent random play of streams:
21
22 disorder set /export/radio/CUR1350.oggradio pick_at_random 0
23
24You can then queue a stream like any other track. It won't automatically
25interrupt the playing track, you have to scratch it manually. Go back to
26normal play by scratching the stream.
27
1fe9ef21 28
803f6e52 29RTP Streaming
30=============
31
32DisOrder is now capable to transmitting RTP streams over a suitable network.
33To enable this make sure that allplayers use the speaker process, i.e. execraw
34rather than exec (or it won't work properly) and configure the network speaker
35backend:
36
37 speaker_backend network
38 broadcast 172.17.207.255 9003
39 broadcast_from 172.17.207.2 9002
40
41broadcast_from is optional but may be convenient for some cases.
42
43To play, use the disorder-playrtp client.
44
45 disorder-playrtp 0.0.0.0 9003
46
47Currently only 16-bit 44100Hz stereo is supported, which requires about
481.4Mbit/s. Possibly other lower-quality but lower-bandwidth encodings will be
49supported in future.
50
51If you have a too-recent version of sox you may need to set the sox_generation
52option.
53
54
55Icecast Streaming
56=================
1fe9ef21 57
58This can be achieved using the speaker_command option and Icecast (see
59http://www.icecast.org/). It will only work if you use the speaker process,
60i.e. execraw for everything.
61
62I used:
63
64 speaker_command "ices2 /etc/disorder/ices.xml"
65
66where 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
107This doesn't seem to get on very well with pausing but you're unlikely to want
108to pause a stream in any case. I used IceCast 2.3.1 and Ices 2.0.1. You can
109play the stream with XMMS or whatever. The total setup seems to play rather
110behind the 'current' time, watch this space for a fix (or contribute one!)
111
803f6e52 112If you have a too-recent version of sox you may need to set the sox_generation
113option.
1fe9ef21 114
115
460b9539 116Local Variables:
117mode:text
118fill-column:79
119End: