darkice doesn't accept pulseaudio input

Bug #1306978 reported by STrRedWolf
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
darkice (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Darkice on Ubuntu does not accept pulseaudio input. It thinks it's an ALSA input, and fails to open it.

tygris@redwolf-linux:~/dradio$ darkice -c darkice.cfg
DarkIce 1.0 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2010, 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: darkice.cfg
Using ALSA DSP input device: pulseaudio
Could not set POSIX real-time scheduling, this may cause recording skips.
Try to run darkice as the super-user.
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM pulseaudio
DarkIce: DarkIce.cpp:1187: can't open connector [0]
tygris@redwolf-linux:~/dradio$

This is a compile configuration bug, since I can compile it with pulseaudio input on Gentoo and works flawlessly -- it picks up the audio from PulseAudio (in this case input from an iPad 4 being sent via Bluetooth, thus th need for PulseAudio) and sends it to Icecast 2 on a Debian ARM system.

Release: 13.10
Package version: 1.0-1ubuntu1

Revision history for this message
STrRedWolf (strredwolf) wrote :
Revision history for this message
Jérémy Munsch (jeremy-munsch) wrote :

I confirm this. I am on a Dell Inspiron N5110, everything works well with Lubuntu 14.04 fresh install.
I also installed audacity pulse, pavucontrol.

By default alsa records my integrated microphone only, by playing with pavu i was able to record the pulse loopback.

I also see audacity when i am recording, on pavucontroland i was able to change the source on it like many tutorials suggest.

With darkice i can on record my microphone on alsa loopback.

I use the following config: in /etc/darkice.cfg

[general]
duration=0
bufferSecs=1
reconnect=yes

[input]
#device=default
device = pulse # OSS DSP soundcard device for the audio input
#paSourceName = alsa_input.pci-0000_00_1b.0.analog-stereo
sampleRate = 44100
bitsPerSample = 16
channel = 2

[icecast2-0]
bitrateMode=vbr
quality=1.0
format=mp3
server=localhost
port=8000
password=hackme
mountPoint=radio1
name=mawebradio
description=Une super radio...
url=http://mawebradio.fr
genre=hardcore

The result when i launch sudo darkice is:

$ sudo darkice
DarkIce 1.0 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2010, 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 ALSA DSP input device: pulse
Using POSIX real-time scheduling, priority 98
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

DarkIce: DarkIce.cpp:1187: can't open connector [0]

I used the default repo packages (sudo apt-get install icecast2 darkice ...)

With this working i could stream my music form my laptop to my windows phone linked to my stereo ^^

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in darkice (Ubuntu):
status: New → Confirmed
Revision history for this message
Jérémy Munsch (jeremy-munsch) wrote :

I found a way to make it work:
$ darkice

If i run darkice in sudo mode it doesn't work, so just run darkice with device=pulse like
[input]
#device=default
device = pulse # OSS DSP soundcard device for the audio input
#paSourceName = alsa_input.pci-0000_00_1b.0.analog-stereo
sampleRate = 44100
bitsPerSample = 16
channel = 2

and it works.

A tip for anyone getting here:

if you type : pactl load-module module-null-sink sink_name=anyname

it makes a new device "Moitor of someting" in pavu, and you can make a program play on that chanel and then make darkice record on that channel so the sound played by default programs aren't recorded.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.