Audio control with Ubuntu inside Docker
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
Trying to achive:
- Docker running Ubuntu xenial.
- Process inside the docker is launching Chromium. Chromium is connecting to WebRTC session (peer to peer meeting with audio).
- The Chromium is connected to the default audio device
- While playing the audio from chromium, the process which is able to "listen" to the audio device output, can decide to play audio into the microphone stream, so it can be received by the other peer.
so in general, the process should be able to listen to the audio from the device, and write audio as if it is recived by the microphon. The process knows how to do that if the audio device is configured.
To active this, I tried to setup PulseAudio and have a virtual device that can handle both input and output.
First setup was:
pulseaudio -D --exit-idle-time=-1
pactl load-module module-null-sink sink_name=DummyOutput sink_properties=device.description="Virtual_Dummy_Output"
pacmd load-module module-virtual-sink sink_name=v-sink
pacmd set-default-sink v-sink
pacmd set-default-source v-sink.monitor
(inspired by this answer)
That enabled to listen to the audio from the virtual device output.
To add also audio input (microphone) I added the following to add virtual microphone:
pactl load-module module-null-sink sink_name=MicOutput sink_properties=device.description="Virtual_Microphone_Output"
pacmd load-module module-virtual-source source_name=VirtualMic
After adding this, I started to get mixed audio - speaker & mic - which cause the peer connection to get echos and not a clear sound.
I understand that I need to separate the virtual device to 2 different sinks, but any configuration that I tries caused other unexpected results.
I don't have much experience with PulseAudio so appreciate any help / reference.
How can PulseAudio be configured to have default Virtual Device/s which can act as regular line-in and Speakers. And when piping audio to the mic it will not be heard by the speakers?
sound pulseaudio alsa chromium
add a comment |Â
up vote
0
down vote
favorite
Trying to achive:
- Docker running Ubuntu xenial.
- Process inside the docker is launching Chromium. Chromium is connecting to WebRTC session (peer to peer meeting with audio).
- The Chromium is connected to the default audio device
- While playing the audio from chromium, the process which is able to "listen" to the audio device output, can decide to play audio into the microphone stream, so it can be received by the other peer.
so in general, the process should be able to listen to the audio from the device, and write audio as if it is recived by the microphon. The process knows how to do that if the audio device is configured.
To active this, I tried to setup PulseAudio and have a virtual device that can handle both input and output.
First setup was:
pulseaudio -D --exit-idle-time=-1
pactl load-module module-null-sink sink_name=DummyOutput sink_properties=device.description="Virtual_Dummy_Output"
pacmd load-module module-virtual-sink sink_name=v-sink
pacmd set-default-sink v-sink
pacmd set-default-source v-sink.monitor
(inspired by this answer)
That enabled to listen to the audio from the virtual device output.
To add also audio input (microphone) I added the following to add virtual microphone:
pactl load-module module-null-sink sink_name=MicOutput sink_properties=device.description="Virtual_Microphone_Output"
pacmd load-module module-virtual-source source_name=VirtualMic
After adding this, I started to get mixed audio - speaker & mic - which cause the peer connection to get echos and not a clear sound.
I understand that I need to separate the virtual device to 2 different sinks, but any configuration that I tries caused other unexpected results.
I don't have much experience with PulseAudio so appreciate any help / reference.
How can PulseAudio be configured to have default Virtual Device/s which can act as regular line-in and Speakers. And when piping audio to the mic it will not be heard by the speakers?
sound pulseaudio alsa chromium
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Trying to achive:
- Docker running Ubuntu xenial.
- Process inside the docker is launching Chromium. Chromium is connecting to WebRTC session (peer to peer meeting with audio).
- The Chromium is connected to the default audio device
- While playing the audio from chromium, the process which is able to "listen" to the audio device output, can decide to play audio into the microphone stream, so it can be received by the other peer.
so in general, the process should be able to listen to the audio from the device, and write audio as if it is recived by the microphon. The process knows how to do that if the audio device is configured.
To active this, I tried to setup PulseAudio and have a virtual device that can handle both input and output.
First setup was:
pulseaudio -D --exit-idle-time=-1
pactl load-module module-null-sink sink_name=DummyOutput sink_properties=device.description="Virtual_Dummy_Output"
pacmd load-module module-virtual-sink sink_name=v-sink
pacmd set-default-sink v-sink
pacmd set-default-source v-sink.monitor
(inspired by this answer)
That enabled to listen to the audio from the virtual device output.
To add also audio input (microphone) I added the following to add virtual microphone:
pactl load-module module-null-sink sink_name=MicOutput sink_properties=device.description="Virtual_Microphone_Output"
pacmd load-module module-virtual-source source_name=VirtualMic
After adding this, I started to get mixed audio - speaker & mic - which cause the peer connection to get echos and not a clear sound.
I understand that I need to separate the virtual device to 2 different sinks, but any configuration that I tries caused other unexpected results.
I don't have much experience with PulseAudio so appreciate any help / reference.
How can PulseAudio be configured to have default Virtual Device/s which can act as regular line-in and Speakers. And when piping audio to the mic it will not be heard by the speakers?
sound pulseaudio alsa chromium
Trying to achive:
- Docker running Ubuntu xenial.
- Process inside the docker is launching Chromium. Chromium is connecting to WebRTC session (peer to peer meeting with audio).
- The Chromium is connected to the default audio device
- While playing the audio from chromium, the process which is able to "listen" to the audio device output, can decide to play audio into the microphone stream, so it can be received by the other peer.
so in general, the process should be able to listen to the audio from the device, and write audio as if it is recived by the microphon. The process knows how to do that if the audio device is configured.
To active this, I tried to setup PulseAudio and have a virtual device that can handle both input and output.
First setup was:
pulseaudio -D --exit-idle-time=-1
pactl load-module module-null-sink sink_name=DummyOutput sink_properties=device.description="Virtual_Dummy_Output"
pacmd load-module module-virtual-sink sink_name=v-sink
pacmd set-default-sink v-sink
pacmd set-default-source v-sink.monitor
(inspired by this answer)
That enabled to listen to the audio from the virtual device output.
To add also audio input (microphone) I added the following to add virtual microphone:
pactl load-module module-null-sink sink_name=MicOutput sink_properties=device.description="Virtual_Microphone_Output"
pacmd load-module module-virtual-source source_name=VirtualMic
After adding this, I started to get mixed audio - speaker & mic - which cause the peer connection to get echos and not a clear sound.
I understand that I need to separate the virtual device to 2 different sinks, but any configuration that I tries caused other unexpected results.
I don't have much experience with PulseAudio so appreciate any help / reference.
How can PulseAudio be configured to have default Virtual Device/s which can act as regular line-in and Speakers. And when piping audio to the mic it will not be heard by the speakers?
sound pulseaudio alsa chromium
asked May 10 at 15:51
Satumba
1011
1011
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034554%2faudio-control-with-ubuntu-inside-docker%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password