Streaming over Discord on an Ubuntu System
Introduction
As a linux aficionado I've recently committed to a an Ubuntu system to meet the bulk of my laptop / workstation needs which include -- among many other things -- supporting distributed (i.e., remote) community engagement. I've had a long-standing interest in providing immersive on-line experiences using a wide range of media -- an interest which has often gone hand-in-hand with video gaming. So it should come as no surprise that, in order to satisfy numerous use-cases I decided to explore the possibility of hosting community meetings and events using Discord on my Ubuntu system.
While it proved very good at meeting many of my needs as a video-voice-chat server, Discord proved difficult in one mission-critical aspect; streaming video content using screen share. The problem is that Discord on Linux cannot stream application audio during screen shares.
The Problem
A little research showed it wasn't just me. At the time of this writing Discord does not -- and cannot in-and-of-itself -- capture audio when screen sharing on linux. The problem revolves around streaming audio and the architecture surrounding audio capture on linux.
Purpose
Finding a solution to the problem -- a workaround really -- turned out to require some effort. So the purpose of this post is to share my results with the community and, hopefully, spare some linux/discord enthusiasts out there some of the effort I had to work through by way of trial-and-error.
Solution
On researching the solution I found most existing workarounds kind of vague and it took a while for me to land on something workable. Proposed solutions ranged from installing a utility called pulsemixer, to attempting to set up a virtual camera using OBS Studio . None of these really worked for me although OBS seems to have promise for other linux broadcast use-cases. What worked best for me in the end was a solution using pavucontrol .
So, in a nutshell, I'll summarize the workaround, and then dive a bit deeper into the details for those who may be interested.
The Recipe
First, the short answer...
In order to stream video over discord what worked best for me was to:
-
Install pavucontrol.
-
Set up a voice channel on Discord.
-
Use Discord's screen share to select a screen or window to share.
-
Use pavucontrol to capture the audio from the selected screen or application window.
Just be aware, if you fall back on this approach, you won't be heard if you try using your mic while sharing your application A/V. To get your voice back you'll have to switch back to your voice source in pavucontrol .
Understanding your linux Audio System
To get this workaround to actually work, you'll want to understand a bit about your linux audio system. For Ubuntu at least, the framework for working with audio streams is PulseAudio . Among other things, PulseAudio enables routing and mixing audio streams for recording and production.
pavucontrol
is a lightweight GUI that sits on top of PulseAudio enabling you to control important aspects of audio streaming like source selection and volume controls.
In order to use pavucontrol with Discord to stream video sound you can use the following procedure.
Procedure
One-time Setup
- Verify that PulseAudio is available on your system (it will usually be installed and operating on linux distros).
$ pulseaudio --version
2. PulseAudio should be running as a process which can be verified with:
$ ps aux | grep pulseaudio
-
Install pavucontrol
sudo apt update sudo apt install pavucontrol
-
And, of course, it's assumed you have Discord installed on your system (the easiest way as of this writing is with snap since it doesn't seem to be registered as a APT repository)...
sudo snap install discord
Routine Use
Once you've completed the initial setup, you can use the following procedure to stream audio and video through discord as desired. My use-case that prompted this post concerns streaming video in a browser but I'm guessing it will generalize to other application windows.
-
Launch Discord.
-
Launch your browser. Find whatever video it may be that you want to share.
-
Use the screen-share control in Discord to select and share the screen/window with your video.
Once you have the screen-share running you'll have an additional audio stream which you should be able to control through pavucontrol. So ...
-
Launch pavucontrol.
-
Go to the Recording Tab. Find the drop down box and change the sound source to: "Monitor of Built-in Audio Analog Stereo". This is the WebRTC stream created by Discord when you start the share.

And that's basically it. That's the workaround to fix the problem of audio streaming using screen share on discord on linux (at least for Ubuntu).
Additional Tweaks
A few more things worth mentioning.
More pavucontrol settings
Another problem I had to work out concerned the the perceived quality of my voice streaming over Discord. Friends complained that the audio quality of my voice was poor when speaking through my mic. The problem may have been due to audio settings on my system. Through trial-and-error we found that lowering the input volume on the Input Devices tab using pavucontrol significantly improved the quality. I found setting the dB level to about 25% worked well on my system.

Disable Krisp for Music
Another issue we encountered almost immediately revolves around use-cases involving music. On attempting to share music audio with friends we quickly found the workaround became unusable. By and large, songs we tried to stream (e.g., anime theme songs) were not captured. That is, only the segments of the song with vocals would stream out to users over the discord channel.
Through trial-and-error we identified discord's use of Krisp as the probable culprit. In all fairness to discord, their main use-case is to provide excellent voice streaming -- and Krisp helps with this by applying a machine learning solution to noise suppression. But when trying to stream music, the unhappy side effect for us is that music gets filtered out. Users may want to keep this in mind when attempting to stream music using this workaround.
To disable Krisp:
- Open the settings view for your discord voice channel...

-
Go to "Video and Voice", and
-
Find the section enabling you to disable the noise suppression ...

Summary
So that's just about it. To sum up, this post is intended to help with a workaround to the problems encountered by linux users wanting to stream A/V content using Discord. The problem is that discord does not have an internal solution enabling screen capture and streaming that includes application audio. The workaround provided here shows how to use pavucontrol to redirect the sound source for WebRTC streaming (utilized by Discord) to the desired share application (albeit at the expense of losing the host mic during the share).
Discussion
So, it's a bit of a disappointment to me, that, as usual, linux adopters are treated as second class citizens when it comes to feature support for gaming systems. By that I mean that video game applications and applications supporting the industry seem to be developed for Windows first. This despite the overwhelmingly vast contributions made by the linux community of users to software engineering and computer science in general. The screen share feature on Discord is reported to support application A/V streams internally on Windows. But on linux, as you see here, not-so-much. So hopefully the workaround I've described here will help mitigate the problem -- at least for some users for some use-cases. In any event, it's prompted me to head down the path of a prototype implementation for peer-to-peer WebRTC applications on linux. Tune back in for future posts on that project.
One more point before leaving off. The elephant-in-the-room that I haven't mentioned in this post concerns copyright and copyright infringement. As more and more advancements are made facilitating the sharing and distribution of digital content it becomes increasingly easier and more tempting to violate copyright restrictions. A full discussion is beyond the scope of this post, but, for the moment suffice it to say that it is my strong opinion that copyright restriction on all content should be respected. As a content provider, I know as well as anyone that mechanisms must be in place, and respected, that allow content producers to make a living off their hard work. So support your local artists and compensate those whose content you use accordingly!
Acknowledgments
Special thanks to Luke Nagel for contributing time and effort to develop the workaround proposed in this post.