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