dox/org/darkice-to-icecast.org

55 lines
2.3 KiB
Org Mode
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#+TITLE: To stream any audio using darkice to apradio icecast server
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 doesnt actually point at a sound card, but allows other programs to capture that output before its 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 its 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 [[./cfg/darkice.cfg][here]].
#+BEGIN_SRC ini
[input]
device = pulseaudio
sampleRate = 44100
bitsPerSample = 16
channel = 2
paSourceName = stream.monitor
[icecast2-0]
format = mp3
bitrateMode = vbr
quality = 0.8
server = radio.anarchyplanet.org
port = 8000
password = [secret password]
mountPoint = live
#+END_SRC
* 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.~
* RTFM
- https://chinmay.audio/blog/streaming-audio
- http://www.skyehaven.net/blog/2011/03/14/mumble-icecast/
* secret password :noexport:
source: PmR2hLvDekej7n8pcjdH5HCLJFCZng
live: livetest