Linux discord no sound stream

Linux Mint Forums

Any possibility to get discord to share a window with sound?

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

illegalwombat Level 1
Posts: 19 Joined: Tue Jun 30, 2020 5:32 am Location: Italy

Any possibility to get discord to share a window with sound?

Post by illegalwombat » Wed Jul 29, 2020 2:10 pm

I’m sure that I managed to get it to work at some point, I MIGHT be wrong, but I think it worked when I was testing things before moving from windows to linux for good.
Sorry for the uninteresting rant but. It’s one of the few things I can do to spend quality time with my long distance girlfriend, watching movies and streaming videogames I play for her, discord is the only way I know of to stream in real time, but without sound it’s pretty much useless.

After some testing, I figured out a quick and dirty way to make this work, it may not work for everyone and it’s also one heck of a workaround, but I’ll explain how hoping people finding this thread could find it useful. I’ll mention that this may work for me just because my headset has two output lines.

For this to work you’ll need two discord accounts, you can log your main account on your discord client and the second account on a discord tab in your browser.
For simplicity, we will call the account you log on your discord program «main» and the one logged in your browser «browser».

On your browser account make sure you disable your headphones/sound output
On your main account make sure you mute the browser user on your voice chat
If you don’t do the two above things you’ll hear a lot of echo from yourself, your friends and your game/program

On your browser: Go to sound settings, your input should be one of the monitor options.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 2:40 pm

I have no experience with Discord, nor even streaming sound outbound, but install PulseAudio Volume Control (pavucontrol) and paprefs. In paprefs, you can check the box on the last tab to enable simultaneous output, then look on pavucontrol’s Playback tab while playing a movie and you might be able to change it to also output to Discord.

Читайте также:  Welcome to your_domain!

This is a guess, and it may not work, but might get you started on the path to a working solution.

Image

My sound fix tips for Linux Mint

illegalwombat Level 1
Posts: 19 Joined: Tue Jun 30, 2020 5:32 am Location: Italy

Re: Any possibility to get discord to share a window with sound?

Post by illegalwombat » Wed Jul 29, 2020 3:04 pm

Hey MrEen, thanks for answering, it’s appreciated!
I’m not sure I get it. I installed the stuff you suggested but the option you mention says: Add virtual output device for simultaneous output on all local sound cards», the sound from my computer doesn’t get through to stream, would it be possible to, instead, take the sound from a specific window/program and send it to the same line as the microphone?

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 3:10 pm

Umm, You kind of jumping ahead of me a bit. I just realized that what you want to output to Discord is Monitor of. . Is Discord even there on the Playback tab when you’re using it?

Image

My sound fix tips for Linux Mint

illegalwombat Level 1
Posts: 19 Joined: Tue Jun 30, 2020 5:32 am Location: Italy

Re: Any possibility to get discord to share a window with sound?

Post by illegalwombat » Wed Jul 29, 2020 3:25 pm

To explain better what I wish to accomplish, since sometimes I don’t do that very well:
I’m in a voice call on discord, discord has a button to stream a screen or a specific program.
The way it should work is that what you stream should give both sound and video .
The problem I have, which seems to be a very common one too, is that the other person only gets the video with no sound from the programs I’m trying to show them.

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 3:50 pm

Gotcha, and thanks for the clarification. I’m thinking when you’re on a Discord call, you have Discord (could be under another name) available on the Recording (not Playback, my mistake) tab of pavucontrol, showing it’s getting the audio from the proper source for your mic (probably Built-in Audio Analog Stereo ) that can be changed to Monitor of Built-in Audio Analog Stereo by clicking on the former. That should route the sound of what you’re listening to over the call. Unfortunately, you’re going to lose the Microphone input when doing this.

It’s probably possible to create a multiple source doohicky much like paprefs creates a multiple sink doohicky, but it’s not something I remember ever helping with.

Let me know if doing that works as I’ve stated. If so, I’ll figure out how to create a multiple source for your purpose.

Image

My sound fix tips for Linux Mint

illegalwombat Level 1
Posts: 19 Joined: Tue Jun 30, 2020 5:32 am Location: Italy

Re: Any possibility to get discord to share a window with sound?

Post by illegalwombat » Wed Jul 29, 2020 4:01 pm

Hah, no thank you for being so nice.
Here’s what I have on pavucontrol under «Recording». I must confess I just recently switched back to linux after a very long pause, so all t he practice I had is long gone, I might be a bit of a nuisance to offer help to, I hope you have a nice amount of patience, my apologies.

EDIT:
Sorry, I meant to paste a link to a screenshot but I forgot to:
https://i.imgur.com/f84XySp.png
I don’t have any program in that list, just sound sources/output, am I misunderstanding your instructions?

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 4:25 pm

Читайте также:  Format usb linux commands

No worries, I have plenty of patience left today.

Okay, Discord is run via the web browser, correct? That one option you show is most likely what we want. If you click on the box that starts with SteelSeries, you should then see other options. Choose the one that starts with Monitor of. and see if that does it.

Be aware, these things only show while active. If you were to close the browser, that entire entry would disappear. That means everything has to be in use to test/change it. In your case, even closing the appropriate tab will probably make that entry disappear.

Image

My sound fix tips for Linux Mint

illegalwombat Level 1
Posts: 19 Joined: Tue Jun 30, 2020 5:32 am Location: Italy

Re: Any possibility to get discord to share a window with sound?

Post by illegalwombat » Wed Jul 29, 2020 5:07 pm

Discord can run in a browser page or can be installed, in my care I keep it installed, always liked it better.

But back to the matter at hand, if I do click on steelseries and pick the monitor option I can get the other person to hear what comes out from my computer, as you stated they don’t hear me anymore though.

My headset has two sound outputs in one, so I can decide if I hear voicechat or other things louder. Because of that I was even capable of picking exclusively the sound channel coming from everything EXCEPT for voice chat, which will probably come in handy.

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 5:13 pm

Okay, very good. I’ll do a little research to combine sources so both the computer sound as well as mic input will get sent. To get it to work, I’ll need the output of this command to see your sound setup:

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999

Image

My sound fix tips for Linux Mint

illegalwombat Level 1
Posts: 19 Joined: Tue Jun 30, 2020 5:32 am Location: Italy

Re: Any possibility to get discord to share a window with sound?

Post by illegalwombat » Wed Jul 29, 2020 5:27 pm

https://termbin.com/hcy5
Here you go!
For learning purposes, what did I just do here?

And on a side note, chances are you’re in the US, I’m in Europe and it’s very late here, so I hope to catch some rest and get back to this tomorrow, if I manage to get it to work it would be pretty fantastic, at the moment I only have two issues left to be able to do all I was doing on windows so that my switch is flawless.
I thank you for your help, it’s much appreciated!

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 5:46 pm

What you did was retrieve and run a script that then ran a bunch of info gathering commands and uploaded the results to termbin.com. That script is the most thorough of any I’ve seen for sound issues, so I tend to use it regularly. It prevents me needing to ask for outputA then outputB then outputC, etc.

You can look through the output yourself, but right now most of it will be gibberish to you in all likelihood. Over the course of 2+ years of working on sound issues, I’ve come to understand just about all of it, though sometimes I cannot understand why something is different in one users output vs another users.

Читайте также:  Find no match linux

Unfortunately, this isn’t going to be quite as simple as I’d hoped, but all the info is in the accepted answer here: https://askubuntu.com/questions/421014/ . on-like-sk

I’ll combine what’s needed from your output with the instructions in that post to give you a step-by-step guide to make this work shortly. I realize it’ll be Thursday before you can test it.

Image

My sound fix tips for Linux Mint

Re: Any possibility to get discord to share a window with sound?

Post by MrEen » Wed Jul 29, 2020 9:08 pm

Okay, here’s my attempt at recreating what was in that post I linked to:

First run these commands when you’re ready to test on Discord. If we get everything working, we’ll then need to edit a file to make these changes permanent. Right now, doing these will be undone with a reboot or log out.

Here are the commands to run:

pacmd load-module module-null-sink sink_name=Virtual1 sink_properties=device.description=Virtual1
pacmd load-module module-null-sink sink_name=Virtual2 sink_properties=device.description=Virtual2
pacmd load-module module-loopback latency_msec=1 sink=Virtual1
pacmd load-module module-loopback latency_msec=1 sink=Virtual1 source=Virtual2.monitor
pacmd load-module module-loopback latency_msec=1 sink=alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo source=Virtual2.monitor
pacmd set-default-source Virtual1.monitor
pacmd set-default-sink alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo

I’ve changed the first word on each line from pactl to pacmd. That’s just a preference of mine. They’re mostly identical commands. And this point forward I’ll stick with pactl just to speed this up a bit for myself.

Now the trickier part, moving the inputs/outputs. I’ll just quote the other post then explain what they’re doing:

Recording: confirm Skype from Virtual1.monitor or using CLI (I remove some lines from results, avconv as example):

$ pactl list short clients
23 protocol-native.c chromium-browser
24 protocol-native.c chromium-browser
45 protocol-native.c pavucontrol
237 protocol-native.c avconv
239 protocol-native.c pactl

$ pactl list short source-outputs
35 0 45 protocol-native.c float32le 1ch 25Hz
36 1 45 protocol-native.c float32le 1ch 25Hz
37 2 45 protocol-native.c float32le 1ch 25Hz
38 3 45 protocol-native.c float32le 1ch 25Hz
39 4 45 protocol-native.c float32le 1ch 25Hz
41 0 45 protocol-native.c float32le 1ch 25Hz
42 1 45 protocol-native.c float32le 1ch 25Hz
52 1 45 protocol-native.c float32le 1ch 25Hz
54 1 237 protocol-native.c s16le 2ch 48000Hz

$ pactl move-source-output 54 Virtual1.monitor

In that example, you’d run pactl list short clients and look for the webrtc # for your case. The other person used avconv which had 237. Then run pactl list short source-outputs and find the index number that in the above case was 237, but your webrtc # will be different. As you can see, 237 near the bottom of that output has the index number 54, so the last command was pactl move-source-output 54 Virtual1.monitor and the 54 is the only thing you’ll need to change based on your outputs. In all liklihood, your outputs will be shorter, possibly only a single line each.

Now, when you want to listen to some music and not use that setup, run pactl list short sink-inputs and look for the index number for the player that may have been in the pactl list short clients output earlier, or if it wasn’t open then, run that again first. Once you know the index number, use pactl move-sink-input 17 Virtual2 replacing 17 with whatever output you had.

I realize this will be a bit difficult to wrap your head around. Play with it some remembering that a reboot will undo everything. If you get stuck, post where you got to and show your outputs before getting stuck. I’m not sure how much I’ll be here on Thursday, but I will be around at times for sure.

Image

My sound fix tips for Linux Mint

Источник

Оцените статью
Adblock
detector