Difference between revisions of "Linux Audio Streaming / Icecast"

From Hackerspace ACKspace
Jump to: navigation, search
Line 69: Line 69:
 
<br>  
 
<br>  
  
[nowiki]<br>  
+
<nowiki>
  
 +
<br>
  
 +
<br>
  
 
Voorbeeld config&nbsp;:<br>  
 
Voorbeeld config&nbsp;:<br>  
Line 93: Line 95:
 
<br>  
 
<br>  
  
[/nowiki]<br><br>
+
<br><br>
 +
 
 +
</nowiki>

Revision as of 18:25, 16 December 2012

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

VLC en streaming faalt ook hard omdat je geen deugelijke info kunt achterhalen/instellen.

Korte versie :

ICECAST - Server

DARKICE - Client

ALSAMIXER - Instellen input



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

Nodig om line in door te zetten naar icecast server.

apt-get install darkice

Er is een gui-iets genaamd darksnow, maar die is oud en geeft geen juiste config.

Gebruik man darkice.cfg voor de commandos/opties


Starten :

darkice -v 10 -c <config>


<br> <br> Voorbeeld config :<br> <br> [general]<br>duration = 0 # duration of encoding, in seconds. 0 means forever<br>bufferSecs = 20 # size of internal slip buffer, in seconds<br>reconnect = yes # reconnect to the server(s) if disconnected <br> this section describes the audio input that will be streamed <br>[input]<br>device = hw:1,0 # Alsa soundcard device for the audio input<br>sampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100<br>bitsPerSample = 16 # bits per sample. try 16<br>channel = 2 # channels. 1 = mono, 2 = stereo this section describes a streaming connection to an IceCast2 server<br># there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]<br># these can be mixed with [icecast-x] and [shoutcast-x] sections <br>[icecast2-0]<br>bitrateMode = cbr # constant bit rate<br>bitrate = 192 # bitrate<br>format = mp3 # format of the stream: mp3<br>quality = 1.0 # quality of the stream sent to the server<br>server = ............. # host name of the server<br>port = 8000 # port of the IceCast2 server, usually 8000<br>password = .................  # source password to the IceCast2 server<br>mountPoint = test.mp3 # mount point of this stream on the IceCast2 server<br>name = Test # name of the stream<br>description = Test # description of the stream<br>url = http://test.com # URL related to the stream<br>genre = Test # genre of the stream<br>public = no # advertise this stream?<br>localDumpFile = test.mp3 # Record also to a file [icecast2-1]<br>bitrateMode = cbr # constant bit rate<br>bitrate = 192 # bitrate<br>format = vorbis # format of the stream: mp3<br>quality = 1.0 # quality of the stream sent to the server<br>server = ...........  # host name of the server<br>port = 8000 # port of the IceCast2 server, usually 8000<br>password = ....................  # source password to the IceCast2 server<br>mountPoint = test.ogg # mount point of this stream on the IceCast2 server<br>name = Test # name of the stream<br>description = Test # description of the stream<br>url = http://test.com # URL related to the stream<br>genre = Test # genre of the stream<br>public = no # advertise this stream?<br>localDumpFile = test.ogg # Record also to a file <br> <br><br>