Thicket data repository for the EEG
1{
2 "id": "https://www.tunbury.org/2019/09/01/internet-radio-from-raspberry-pi",
3 "title": "Internet Radio from Raspberry PI",
4 "link": "https://www.tunbury.org/2019/09/01/internet-radio-from-raspberry-pi/",
5 "updated": "2019-09-01T12:41:29",
6 "published": "2019-09-01T12:41:29",
7 "summary": "Install the software packages needed",
8 "content": "<p>Install the software packages needed</p>\n\n<div><div><pre><code>sudo apt-get install libmp3lame0 libtwolame0\nsudo apt-get install darkice\nsudo apt-get install icecast2\n</code></pre></div></div>\n\n<p>During the installation you will be asked to set the icecast password which you’ll need enter into the configuration file below</p>\n\n<p>Check your recording device is present</p>\n\n<div><div><pre><code>pi@raspberrypi:~ $ arecord -l\n**** List of CAPTURE Hardware Devices ****\ncard 1: AK5371 [AK5371], device 0: USB Audio [USB Audio]\nSubdevices: 0/1\nSubdevice #0: subdevice #0\n</code></pre></div></div>\n\n<p>Try to make a recording:</p>\n\n<div><div><pre><code>arecord -D plughw:1,0 temp.wav\n</code></pre></div></div>\n\n<p>If the volume is too quiet, you can adjust it with alsamixer -c 1 where 1 is your audio device. Note that 0 is the Raspberry PI default output device.</p>\n\n<p>Create a configuration file for darkice</p>\n\n<div><div><pre><code># this section describes general aspects of the live streaming session\n[general]\nduration = 0 # duration of encoding, in seconds. 0 means forever\nbufferSecs = 5 # size of internal slip buffer, in seconds\nreconnect = yes # reconnect to the server(s) if disconnected\n\n\n# this section describes the audio input that will be streamed\n[input]\n# device = /dev/dsp # OSS DSP soundcard device for the audio input\ndevice = plughw:1,0 # OSS DSP soundcard device for the audio input\nsampleRate = 22050 # sample rate in Hz. try 11025, 22050 or 44100\nbitsPerSample = 16 # bits per sample. try 16\nchannel = 2 # channels. 1 = mono, 2 = stereo\n\n\n# this section describes a streaming connection to an IceCast2 server\n# there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]\n# these can be mixed with [icecast-x] and [shoutcast-x] sections\n[icecast2-0]\nbitrateMode = abr # average bit rate\nformat = mp3 # format of the stream: ogg vorbis\nbitrate = 96 # bitrate of the stream sent to the server\nserver = localhost # host name of the server\nport = 8000 # port of the IceCast2 server, usually 8000\npassword = password # source password to the IceCast2 server\nmountPoint = mic # mount point of this stream on the IceCast2 server\nname = Microphone Raspberry Pi # name of the stream\ndescription = Broadcast from 2nd room # description of the stream\nurl = http://example.com/ # URL related to the stream\ngenre = my own # genre of the stream\npublic = no # advertise this stream?\n</code></pre></div></div>\n\n<p>Invoke the server by running darkice at the prompt.</p>\n\n<p>Set darkice to run at boot up</p>\n\n<div><div><pre><code>update-rc.d darkice defaults\n</code></pre></div></div>\n\n<p>Open a web browser to <code>http://<pi-ip-address>:8000</code> to view the installation. Add the url source to your Internet radio appliance via <code>http://<pi-ip-address>:8000/mic</code></p>",
9 "content_type": "html",
10 "author": {
11 "name": "Mark Elvers",
12 "email": "mark.elvers@tunbury.org",
13 "uri": null
14 },
15 "categories": [
16 "bells",
17 "raspberrypi"
18 ],
19 "source": "https://www.tunbury.org/atom.xml"
20}