obs-linuxbrowser
obs-linuxbrowser copied to clipboard
Custom audio routing / Browser sound listed in OBS mixer
Is it possible to have the sound from obs-linuxbrowser available on a virtual sound device and/or have it in the mixer. Another option which may be available is to have obs-linuxbrowser have a configuration setting to put the sound on a defined virtual microphone as an alternative to desktop output in a config setting. Would like the ability to have two instances of obs running and sound not interfere from one to another.
Unfortunately CEF does not provide any way to control audio in browser right now. I guess I could add an option to control which audio device is used for output, would have to implement it using alsa/pulseaudio though.
That would be good enough for now.
If you use PulseAudio, you can create a Null sink and point the CEF source via pavucontrol to that Null sink (or a Combine sink if you want to monitor the sound independently).
Am I able to configure the CEF source somehow using the current obs-linuxbrowser? How would I configure that?
As NexAdn suggested, you can use pavucontrol
to configure linuxbrowser instances. In the "playback" tab, select one of the "Chromium" applications and set it's volume and output device (unfortunately no way to tell apart different linuxbrowser instances and real chromium applications)
Ok, do you want me to close this issue?
No, I'm still planning to implement audio controls, so I'll close it myself when done.
So I've spent some time working on this and it turned out that what I had in mind is not really applicable, since chromium opens and closes pulseaudio streams only when necessary. So I won't be able to set the output device and volume level at any point in time, unfortunately.
Will have to leave this open in case any other ideas come to mind.
Maybe we can implement an automatic device switch every time the source gets activated (as I did with automatic reload on scene activation)
I know this is an old issue with not a lot of movement, but I wanted to say that I would love it if there were a way to stabilize where audio output goes. I do a lot with pulseaudio and jack to try to limit capture to only the applications I want on my stream, but with chromium and obs-linuxbrowser sources indistinguishable in pavucontrol and choosing in a seemingly arbitrary fashion to sometimes remember where they were set and sometimes grab something else, keeping stream alerts on stream and e.g. Hangouts notifications off is a challenge.
I realize this is primarily a chromium problem, but if there's a solution at this end it would be really nice.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId
You could use a custom JavaScript to set the output device of the media elements in your website manually.
@marcmagus