Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
raspberry:audio_stream [2018/10/07 21:52] admin [Audio Stream] |
raspberry:audio_stream [2018/10/08 00:09] admin [Link] |
||
---|---|---|---|
Line 4: | Line 4: | ||
---- | ---- | ||
==== Soundcard ==== | ==== Soundcard ==== | ||
+ | |||
check the soundcard: | check the soundcard: | ||
$ cat / | $ cat / | ||
and | and | ||
$ cat / | $ cat / | ||
+ | that could look like that: | ||
+ | 0 [ALSA ]: bcm2835_alsa - bcm2835 ALSA | ||
+ | bcm2835 ALSA | ||
+ | 1 [K6 ]: USB-Audio - Komplete Audio 6 | ||
+ | Native Instruments Komplete Audio 6 at usb-3f980000.usb-1.5, | ||
+ | The ALSA Card ID is 0 and the USB-Audio Card ID is 1\\ | ||
+ | |||
+ | Identify the Soundcard Chip's Device ID | ||
+ | $ ls / | ||
+ | gives: | ||
+ | ALSA card0 card1 cards devices | ||
+ | means there are two sound cards 0 and 1 | ||
+ | $ ls / | ||
+ | gives: | ||
+ | id midi0 pcm0c pcm0p stream0 | ||
+ | Identify the device id: | ||
+ | $ cat / | ||
+ | give: | ||
+ | card: 1 | ||
+ | device: 0 | ||
+ | subdevice: 0 | ||
+ | stream: CAPTURE | ||
+ | id: USB Audio | ||
+ | name: USB Audio | ||
+ | subname: subdevice #0 | ||
+ | class: 0 | ||
+ | subclass: 0 | ||
+ | subdevices_count: | ||
+ | subdevices_avail: | ||
+ | and: | ||
+ | $ cat / | ||
+ | gives: | ||
+ | card: 1 | ||
+ | device: 0 | ||
+ | subdevice: 0 | ||
+ | stream: PLAYBACK | ||
+ | id: USB Audio | ||
+ | name: USB Audio | ||
+ | subname: subdevice #0 | ||
+ | class: 0 | ||
+ | subclass: 0 | ||
+ | subdevices_count: | ||
+ | subdevices_avail: | ||
+ | therefore in both cases the ID is 0.\\ | ||
+ | Install ALSA utilities: | ||
+ | $ sudo apt-get update | ||
+ | $ sudo apt-get install alsa-utils | ||
+ | open ALSO mixer: | ||
+ | $ alsamixer | ||
+ | with F6 select the soundcard.\\ | ||
+ | Test the Sound Card Output: | ||
+ | $ speaker-test -Dplughw: | ||
+ | $ speaker-test -Dplughw: | ||
+ | |||
---- | ---- | ||
- | ==== Icecast & Darkice ==== | + | ==== Darkice ==== |
- | Install | + | Install Darkice.\\ |
update: | update: | ||
- | $ sudo apt-get update | + | $ sudo apt-get update |
- | install icecast2 and darkice: | + | |
- | $ sudo apt-get install icecast2 darkice | + | |
- | if asked type in hostname and password | + | |
- | hostname: localhost | + | |
- | password: ???? | + | |
change config: | change config: | ||
$ sudo nano / | $ sudo nano / | ||
to: | to: | ||
- | # this section describes general aspects of the live streaming session | + | # this section describes general aspects of the live streaming session |
- | duration | + | |
- | bufferSecs | + | |
- | reconnect | + | |
- | # this section describes the audio input that will be streamed | + | |
- | [input] | + | |
- | device | + | |
- | sampleRate | + | |
- | bitsPerSample = 16 # bits per sample. try 16 | + | |
- | channel | + | |
- | # Only stereo mode is supported by pisound. | + | |
- | # this section describes a streaming connection to an IceCast2 server | + | |
- | # there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7] | + | |
- | # these can be mixed with [icecast-x] and [shoutcast-x] sections [icecast2-0] | + | |
- | bitrateMode | + | |
- | bitrate | + | |
- | format | + | |
- | quality | + | |
- | server | + | |
- | port = 8000 # port of the IceCast2 server, usually 8000 | + | |
- | password | + | |
- | mountPoint | + | |
- | name = pisound | + | |
- | description | + | |
- | url = http:// | + | |
- | genre = my genre # genre of the stream | + | |
- | public | + | |
- | # | + | |
- | + | ||
- | or: | + | |
[general] | [general] | ||
- | duration | + | duration |
- | bufferSecs | + | bufferSecs |
- | reconnect | + | reconnect |
- | | + | |
[input] | [input] | ||
- | device | + | device |
- | sampleRate | + | sampleRate |
- | bitsPerSample | + | bitsPerSample = 16 |
- | channel | + | channel |
- | | + | # Only stereo mode is supported by pisound. |
+ | | ||
+ | # there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7] | ||
+ | # these can be mixed with [icecast-x] and [shoutcast-x] sections | ||
[icecast2-0] | [icecast2-0] | ||
- | bitrateMode | + | bitrateMode |
- | | + | |
- | format | + | format |
- | | + | |
- | server | + | server |
- | port = 8000 # port for IceCast2 | + | port = 8000 |
- | password | + | password |
- | mountPoint | + | mountPoint |
- | | + | name = pisound |
+ | description | ||
+ | url = http:// | ||
+ | genre = hits # genre of the stream | ||
+ | public | ||
+ | # | ||
+ | |||
+ | ---- | ||
+ | ==== Icecast ==== | ||
+ | Install Icecast.\\ | ||
+ | update: | ||
+ | | ||
+ | install icecast2: | ||
+ | $ sudo apt-get install icecast2 | ||
+ | if asked type in hostname and password | ||
+ | hostname: localhost | ||
+ | password: ???? | ||
| | ||
- | | + | ---- |
- | run: | + | ==== Stream ==== |
- | $ darkice | + | just run: |
+ | $ darkice | ||
+ | and then open in your browser: | ||
+ | http:// | ||
+ | Icecast2 Status one will find here: | ||
+ | http:// | ||
---- | ---- | ||
- | ==== Link ==== | + | ==== Links ==== |
- | [[https:// | + | [[https:// |
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[http:// | ||
---- | ---- |