The following creates a local WiFi 'radio station' to rebroadcast to an internet radio receiver whatever the soundcard in a Ubuntu PC is playing, specifically on the ALSA devices 'monitor' output.
- Use the following command to list out Alsa output sources.
$ pactl list | grep alsa_output
Mine looks like this. I have a HiFImeDIY audio DAC and a HDMI connected television.
Name: alsa_output.pci-0000_01_00.1.hdmi-surround71-extra1
Monitor Source: alsa_output.pci-0000_01_00.1.hdmi-surround71-extra1.monitor
Name: alsa_output.usb-HiFimeDIY_Audio_HiFimeDIY_DAC-01.iec958-stereo
Monitor Source: alsa_output.usb-HiFimeDIY_Audio_HiFimeDIY_DAC-01.iec958-stereo.monitor
Name: alsa_output.pci-0000_01_00.1.hdmi-surround71-extra1.monitor
Monitor of Sink: alsa_output.pci-0000_01_00.1.hdmi-surround71-extra1
Name: alsa_output.usb-HiFimeDIY_Audio_HiFimeDIY_DAC-01.iec958-stereo.monitor
Monitor of Sink: alsa_output.usb-HiFimeDIY_Audio_HiFimeDIY_DAC-01.iec958-stereo
If you don't see a Monitor output, find another soundcard for your PC? - Identify the line for the 'Monitor Source' for the 'Name' output that you normally play PC audio out to.
- Install DarkIce from http://www.darkice.org/
- Install and configure Icecast (http://icecast.org) securely from documentation
$ sudo apt-get install icecast - Create (and edit) the following as /etc/darkice.cfg
[general]
duration = 3600
bufferSecs = 5
[input]
device = pulseaudio # hw:2,1
paSourceName = alsa_output.usb-HiFimeDIY_Audio_HiFimeDIY_DAC-01.iec958-stereo.monitor
sampleRate = 44100
bitsPerSample = 16
channel = 2
[icecast2-0]
format = mp3
sampleRate = 44100
channel = 2
bitrateMode = cbr
bitrate = 192
server = serverme.lan
port = 8000
password = youricecastserverpasswordhere
mountPoint = live96
name = tictac2
description = Streaming from TicTac2
url = http://www.yourserver.com
genre = live
public = yes
remoteDumpFile = /tmp/live96.mp3
- Start DarkIce with the following command, and 'tune in' from your internet radio. When finished listening stop the darkice process with Ctrl-C.
$ sudo /usr/bin/darkice
DarkIce 1.2 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2013, Akos Maroy and Rafael Diniz
This is free software, and you are welcome to redistribute it
under the terms of The GNU General Public License version 3 or
any later version.
Using config file: /etc/darkice.cfg
Using PulseAudio audio server as input device.
Using PulseAudio source: alsa_output.usb-HiFimeDIY_Audio_HiFimeDIY_DAC-01.iec958-stereo.monitor
Using POSIX real-time scheduling, priority 4
- If you see the following panic message after this, check that the 'paSourceName' is entered correctly and your normal soundcard is actually selected as output in your PC's soundmixer.
No such entity [0]
Assertion 's' failed at pulse/simple.c:253, function pa_simple_free(). Aborting.
Aborted (core dumped)
No comments :
Post a Comment