| 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 | Creating A Stream Of DisOrder Output |
| 30 | ==================================== |
| 31 | |
| 32 | This can be achieved using the speaker_command option and Icecast (see |
| 33 | http://www.icecast.org/). It will only work if you use the speaker process, |
| 34 | i.e. execraw for everything. |
| 35 | |
| 36 | I used: |
| 37 | |
| 38 | speaker_command "ices2 /etc/disorder/ices.xml" |
| 39 | |
| 40 | where ices.xml is: |
| 41 | |
| 42 | <?xml version="1.0"?> |
| 43 | <ices> |
| 44 | <background>0</background> |
| 45 | <logpath>/var/log/ices</logpath> |
| 46 | <logfile>disorder.log</logfile> |
| 47 | <loglevel>4</loglevel> |
| 48 | <consolelog>0</consolelog> |
| 49 | <stream> |
| 50 | <metadata> |
| 51 | <name>lyonesse</name> |
| 52 | <genre>Various</genre> |
| 53 | <description>lyonesse disorder output</description> |
| 54 | </metadata> |
| 55 | <input> |
| 56 | <module>stdinpcm</module> |
| 57 | <param name="rate">44100</param> |
| 58 | <param name="channels">2</param> |
| 59 | <param name="metadata">1</param> |
| 60 | <param name="metadatafilename">/var/disorder/icedata</param> |
| 61 | </input> |
| 62 | <instance> |
| 63 | <hostname>lyonesse.anjou.terraraq.org.uk</hostname> |
| 64 | <port>8000</port> |
| 65 | <password>SOURCE PASSWORD HERE</password> |
| 66 | <mount>/disorder.ogg</mount> |
| 67 | <reconnectdelay>2</reconnectdelay> |
| 68 | <reconnectattempts>5</reconnectattempts> |
| 69 | <maxqueuelength>80</maxqueuelength> |
| 70 | <encode> |
| 71 | <nominal-bitrate>64000</nominal-bitrate> |
| 72 | <samplerate>44100</samplerate> |
| 73 | <channels>2</channels> |
| 74 | <flush-samples>8820</flush-samples> |
| 75 | </encode> |
| 76 | </instance> |
| 77 | |
| 78 | </stream> |
| 79 | </ices> |
| 80 | |
| 81 | This doesn't seem to get on very well with pausing but you're unlikely to want |
| 82 | to pause a stream in any case. I used IceCast 2.3.1 and Ices 2.0.1. You can |
| 83 | play the stream with XMMS or whatever. The total setup seems to play rather |
| 84 | behind the 'current' time, watch this space for a fix (or contribute one!) |
| 85 | |
| 86 | Other DisOrder options you can set are sox_generation which you should set to |
| 87 | if you have a sufficently recent version of sox, due to an incompatile change |
| 88 | in its command syntax; and sample_format which determines what format is |
| 89 | supplied to the speaker_command. See disorder_config(5) for further |
| 90 | information. |
| 91 | |
| 92 | |
| 93 | Local Variables: |
| 94 | mode:text |
| 95 | fill-column:79 |
| 96 | End: |