Difference between revisions of "Linux Audio Streaming / Icecast"

From Hackerspace ACKspace
Jump to: navigation, search
m (fixed TOC transclusion)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Omdat linux en audio nog steeds ZUIGT en de documentatie OOK heb ik hier zelf maar een info dump plek&nbsp;:-)<br>
+
Omdat linux en audio nog steeds ZUIGT en de documentatie OOK heb ik hier zelf maar een info dumpplek :-)
  
 +
VLC en streaming faalt ook hard omdat je geen deugelijke info kunt achterhalen/instellen.
  
VLC&nbsp;en streaming faalt ook hard omdat je geen deugelijke info kunt achterhalen/instellen.<br>
+
Dit gaat alleen over LIVE streamen vanaf een line-in.
  
Dit gaat alleen over LIVE streamen vanaf een line-in. <br>
+
Korte versie:
 +
<noinclude>__TOC__</noinclude>
  
 +
== info ==
 +
In deze braindump ben ik uitgegaan van het gebruik van ALSA.
 +
ALSA is verantwoordelijk voor het aansturen van geluidsdevices onder linux.
 +
Er zijn er nog andere, maar deze shit werkt op de meeste recentere linux distros :)
  
Korte versie&nbsp;:<br>
+
== input ==
  
INPUT - Instellen input <br>
+
We moeten eerst weten welke opname apparaten er onder linux worden herkend.
 
+
Dit kun je vinden door gebruik te maken van het arecord commando.
ICECAST - Server<br>
 
 
 
DARKICE - Client <br>  Wordt mischien ices. <br>
 
 
 
 
 
<br>
 
 
 
<br>
 
 
 
INFO :<br>
 
In deze braindump ben ik uitgegaan van het gebruik van ALSA.<br>
 
ALSA is verantwoordelijk voor het aansturen van geluidsdevices onder linux.<br>
 
Er zijn er nog andere, maar deze shit werkt op de meeste recentere linux distros :) <br>
 
<br>
 
<br>
 
<br>
 
INPUT :<br>
 
 
 
We moeten eerst weten welke opname apparaten er onder linux worden herkend.<br>
 
Dit kun je vinden door gebruik te maken van het arecord commando.<br>
 
  
 
<pre>root@ACK:/etc/icecast2# arecord --list-devices
 
<pre>root@ACK:/etc/icecast2# arecord --list-devices
Line 52: Line 38:
  
 
</pre>
 
</pre>
Als je de line in van de SBLive wil hebben, kies je in dit voorbeeld hw1:0 (Card 1 , device 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 (Card 1 , device 0), de rest gaat uit van dit device.
  
 
+
Met alsamixer kun je record devices en niveau instellen
Met alsamixer kun je record devices en niveau instellen<br>
 
 
<pre>root@ACK:/etc/icecast2# alsamixer -c 1 -V capture
 
<pre>root@ACK:/etc/icecast2# alsamixer -c 1 -V capture
  
Line 61: Line 46:
 
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>
+
== icecast ==
  
<br>
+
Als je zelf streaming server wil draaien
 
+
apt-get install icecast2
<br>
 
 
 
ICECAST<br>
 
 
 
Als je zelf streaming server wil draaien<br>
 
<pre>apt-get install icecast2
 
</pre>
 
<br>
 
  
 
info/handleiding volg  
 
info/handleiding volg  
  
((standaard config /etc/icecast.xml))  
+
(standaard config /etc/icecast.xml)
  
<br><br>
+
== darkice ==
  
<br>
+
Streaming Client
  
DARKICE<br>
+
Nodig om line in door te zetten naar icecast server.
 
+
apt-get install darkice
Streaming Client<br>
 
 
 
Nodig om line in door te zetten naar icecast server.<br>
 
<pre>apt-get install darkice
 
</pre>
 
Er is een gui-iets genaamd darksnow, maar die is oud en geeft geen juiste config.<br>
 
 
 
Gebruik man darkice.cfg voor de commandos/opties<br>
 
 
 
<br>
 
 
 
Starten&nbsp;:<br>
 
<pre>darkice -v 10 -c &lt;config&gt;
 
</pre>
 
<br>
 
  
<br>
+
Er is een gui-iets genaamd darksnow, maar die is oud en geeft geen juiste config.
  
<br>
+
Gebruik man darkice.cfg voor de commandos/opties
  
<br>
+
Starten:
 +
darkice -v 10 -c &lt;config&gt;
  
Voorbeeld config&nbsp;:<br>
+
Voorbeeld config:
  
<br>
 
 
<pre>[general]
 
<pre>[general]
 
duration = 0 # duration of encoding, in seconds. 0 means forever
 
duration = 0 # duration of encoding, in seconds. 0 means forever
Line 158: Line 120:
 
public = no # advertise this stream?
 
public = no # advertise this stream?
 
localDumpFile = test.ogg # Record also to a file </pre>  
 
localDumpFile = test.ogg # Record also to a file </pre>  
<br>
 
  
<br><br>
+
[[Category:Information]]

Latest revision as of 17:35, 22 April 2023

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

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

Dit gaat alleen over LIVE streamen vanaf een line-in.

Korte versie:

info

In deze braindump ben ik uitgegaan van het gebruik van ALSA. ALSA is verantwoordelijk voor het aansturen van geluidsdevices onder linux. Er zijn er nog andere, maar deze shit werkt op de meeste recentere linux distros :)

input

We moeten eerst weten welke opname apparaten er onder linux worden herkend. Dit kun je vinden door gebruik te maken van het arecord commando.

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 (Card 1 , device 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>

Voorbeeld config:

[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