dox/md/darkice-to-icecast.md

81 lines
2.6 KiB
Markdown

---
title: To stream any audio using darkice to apradio icecast server
---
- [Create a null audio sink](#create-a-null-audio-sink)
- [Install and configure darkice](#install-and-configure-darkice)
- [Start darkice](#start-darkice)
- [Start playing your audio](#start-playing-your-audio)
- [[TODO]{.todo .TODO} fix stream address](#fix-stream-address)
- [RTFM](#rtfm)
Some programs might have their own methods of streaming to Icecast.
However, anything you can listen to on your computer you can stream to
the apradio Icecast server.
Create a null audio sink
========================
Enter `pactl load-module module-null-sink sink_name=stream` on the
command line to create a virtual output named "stream" which doesn't
actually point at a sound card, but allows other programs to capture
that output before it's dumped. Pulseaudio creates a 'monitor' for that
output which you can use as input for another program such as darkice.
In this case it will be called "stream.monitor". Darkice will be using
stream.monitor as it's audio input.
Install and configure darkice
=============================
The default systemwide darkice.cfg is at /etc/darkice.cfg. You can edit
this but it\'s better to copy /etc/darkice.cfg somewhere else (e.g.
\~/darkice/darkice.cfg) and use different darkice configurations for
different streaming setups.
Configure darkice to send audio from the monitor of the newly-created
output to the apradio icecast server. Most settings can be left as
default.
Only the relevant options in darkice.cfg are shown below. See a complete
example [here](./cfg/darkice.cfg).
``` {.ini}
[input]
device = pulseaudio
paSourceName = stream.monitor
[icecast2-0]
format = vorbis
server = radio.anarchyplanet.org
port = 8000
password = [secret password]
mountPoint = source.ogg
```
Start darkice
=============
Run `darkice -c darkice.cfg` from the command line. Darkice should now
show up in the recording tab. Change the audio source for darkice to
Monitor of Null Output.
Start playing your audio
========================
This playback device should now show up in the Playback tab of the
PulseAudio control panel. (For example, if you are playing audio in your
browser, a new row should appear in the Playback tab showing your
browser making sound). Change the audio output for your playback device
audio to Null Output.
[TODO]{.todo .TODO} fix stream address {#fix-stream-address}
======================================
currently it\'s <https://radio.anarchyplanet.org/icecast/stream.ogg>
RTFM
====
- <https://chinmay.audio/blog/streaming-audio>
- <http://www.skyehaven.net/blog/2011/03/14/mumble-icecast/>