GNOME How to record browser audio on Linux

There’s a million reasons why you would want to record audio coming from your browser, some — innocuous, some — nefarious. You can definitely record blank video with just the sound in OBS, but that’s not necessarily what you want.

So to record just the browser audio on Linux, you will need two applications and a fairly recent Linux distribution that has the new PipeWire audio system, preferably installed by default. I’m currently using Fedora 40, but it should be the same with the latest Ubuntu long-time support release.

The first application is Sound Recorder (soon to be renamed to Vocalis).

Sound Recorder, main window

It’s literally one-click software to capture anything that goes into your mic that you selected in system settings. And the latter is the problem we need to rectify with the second application called Helvum.

Helvum, main window

Helvum exposes an important aspect of PipeWire — you can route audio and video streams between hardware and software however you like. PipeWire makes some connections automatically. For example you can see here that GNOME’s settings service is always listening to whatever audio capture device you selected.

Hardware monitors to GNOME

You’ll notice that while Sound Recorder is running, it isn’t listed here in Helvum. That’s because the program only opens input ports when it starts to actually record. So let’s do just that. Click the Record button in the headerbar.

Now when you go back to Helvum, you’ll see Sound Recorder with two ports, one for the left channel and one for the right one.

USB inputs to Sound Recorder

The amount of ports depends on whether you are recording to mono or stereo. You need to make that choice in the hamburger menu before you start recording.

Sound Recorder, channels selection

So let’s go to the browser and start playing something. Now you can see Google Chrome in Helvum with multiple ports. Because my USB audio interface of choice has 4 outputs, PipeWire automatically creates four matching output ports for Chrome and connects them. But we only need two of them. FL, which is front left, and FR, which is front right.

Chrome to USB to GNOME’s settings

What we do now is click on the output_FL port and drag the wire to Sound Recorder’s input_FL port, then same same for the right channel’s port.

Now when you go back to Sound Recorder, you can see the waveform moving. This means you are recording whatever is playing in the browser.

By the way, if you have a mic attached to the external audio interface, depending on what you are recording, you might want pressing the phantom power button. This will temporarily cut off the signal from the mic.

Phantom power switch

Alternatively, you can lower the input gain either in settings or on the interface itself. Or, well, remove some of the wires in Helvum. But toggling phantom power is just so much easier.

If you aren’t a GNOME user or dislike GTK, Helvum has an alternative called qpwgraph.

qpwgraph

Personally, I find it somewhat easier to use, because to disconnect something, you just click on the wire and then press Delete. You can even press and hold Ctrl to select multiple wires or do a rubberband selection and then press Delete. Helvum makes things like that unnecessarily difficult, but I can see how it could be preferable to some users.

You can also replace Sound Recorder with something like Audacity, especially if you plan to do some editing afterwards.

You now know how to record your browser audio on Linux. Please use it responsibly, and see you in the next one.