Difference between revisions of "Linux Audio Streaming / Icecast"

From Hackerspace ACKspace
Jump to: navigation, search
Line 3: Line 3:
 
<br>  
 
<br>  
  
INPUT&nbsp;:<br>
+
INPUT&nbsp;:<br>  
  
root@ACK:/etc/icecast2# arecord --list-devices<br>**** List of CAPTURE Hardware Devices ****<br>card 0: SB [HDA ATI SB], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 0: SB [HDA ATI SB], device 2: ALC662 rev1 Analog [ALC662 rev1 Analog]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 1: Live [SB Live! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 1: Live [SB Live! Value [CT4832]], device 1: emu10k1 mic [Mic Capture]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 1: Live [SB Live! Value [CT4832]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>root@ACK:/etc/icecast2# <br><br>
+
root@ACK:/etc/icecast2# arecord --list-devices<br>**** List of CAPTURE Hardware Devices ****<br>card 0: SB [HDA ATI SB], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 0: SB [HDA ATI SB], device 2: ALC662 rev1 Analog [ALC662 rev1 Analog]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 1: Live [SB Live! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 1: Live [SB Live! Value [CT4832]], device 1: emu10k1 mic [Mic Capture]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>card 1: Live [SB Live! Value [CT4832]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]<br> Subdevices: 1/1<br> Subdevice #0: subdevice #0<br>root@ACK:/etc/icecast2# <br><br>  
  
Als je de line in van de SBLive wil hebben, kies je in dit voorbeeld hw1:0, de rest gaat uit van dit device.<br>
+
Als je de line in van de SBLive wil hebben, kies je in dit voorbeeld hw1:0, de rest gaat uit van dit device.<br>  
  
Met alsamixer kun je record devices en niveau instellen<br>
+
Met alsamixer kun je record devices en niveau instellen<br>  
  
root@ACK:/etc/icecast2# alsamixer -c 1 -V capture<br><br>
+
root@ACK:/etc/icecast2# alsamixer -c 1 -V capture<br><br>  
  
Met spatie kun&nbsp; je device kiezen en met pijltjes volume instellen
+
Met spatie kun&nbsp; je device kiezen en met pijltjes volume instellen  
  
<br>
+
<br>
 +
 
 +
<br>
 +
 
 +
<br>
 +
 
 +
ICECAST<br>
 +
 
 +
Als je zelf streaming server wil draaien<br>
 +
 
 +
apt-get install icecast2<br>  
  
 
<br>
 
<br>
  
<br>
+
info/handleiding volg
  
ICECAST<br>
+
((standaard config /etc/icecast.xml))
  
Streaming Server<br>  
+
<br><br>
  
<br>  
+
<br>
  
 
Darkice<br>  
 
Darkice<br>  

Revision as of 18:15, 16 December 2012

Omdat linux en audio nog steeds ZUIGT en de documentatie OOK heb ik hier zelf maar een info dump plek :)


INPUT :

root@ACK:/etc/icecast2# arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 2: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Live [SB Live! Value [CT4832]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Live [SB Live! Value [CT4832]], device 1: emu10k1 mic [Mic Capture]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Live [SB Live! Value [CT4832]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@ACK:/etc/icecast2#

Als je de line in van de SBLive wil hebben, kies je in dit voorbeeld hw1:0, de rest gaat uit van dit device.

Met alsamixer kun je record devices en niveau instellen

root@ACK:/etc/icecast2# alsamixer -c 1 -V capture

Met spatie kun  je device kiezen en met pijltjes volume instellen




ICECAST

Als je zelf streaming server wil draaien

apt-get install icecast2


info/handleiding volg

((standaard config /etc/icecast.xml))




Darkice

Streaming Client

darkice -v 10 -c <config>


Opties/commandos :

man darkice.cfg


Voorbeeld config :


see the darkice.cfg man page for details

this section describes general aspects of the live streaming session


[general]
duration = 0 # duration of encoding, in seconds. 0 means forever
bufferSecs = 20 # size of internal slip buffer, in seconds
reconnect = yes # reconnect to the server(s) if disconnected

this section describes the audio input that will be streamed


[input]
device = hw:1,0 # Alsa soundcard device for the audio input
sampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample = 16 # bits per sample. try 16
channel = 2 # channels. 1 = mono, 2 = stereo

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 = cbr # constant bit rate
bitrate = 192 # bitrate
format = mp3 # format of the stream: mp3
quality = 1.0 # quality of the stream sent to the server
server = ............. # host name of the server
port = 8000 # port of the IceCast2 server, usually 8000
password = .................  # source password to the IceCast2 server
mountPoint = test.mp3 # mount point of this stream on the IceCast2 server
name = Test # name of the stream
description = Test # description of the stream
url = http://test.com # URL related to the stream
genre = Test # genre of the stream
public = no # advertise this stream?
localDumpFile = test.mp3 # Record also to a file

[icecast2-1]
bitrateMode = cbr # constant bit rate
bitrate = 192 # bitrate
format = vorbis # format of the stream: mp3
quality = 1.0 # quality of the stream sent to the server
server = ...........  # host name of the server
port = 8000 # port of the IceCast2 server, usually 8000
password = ....................  # source password to the IceCast2 server
mountPoint = test.ogg # mount point of this stream on the IceCast2 server
name = Test # name of the stream
description = Test # description of the stream
url = http://test.com # URL related to the stream
genre = Test # genre of the stream
public = no # advertise this stream?
localDumpFile = test.ogg # Record also to a file