So, I'm using Kubuntu as my main distro, and Steam is what I use to game. And support for games on Steam is very great. But one thing I've always found a bit annoying is how, in Steam's Game Recording, is that all audio is captured, which can include things like audio playing on my browser. And in the settings, it said that "Recording of game audio is not supported".
Exhibit A: Steam unable to capture specific game's audio
However, I soon found a way to actually capture game audio only (this seems to only apply PipeWire, I haven't tested on just PulseAudio)
- First, I installed an app that allow me to manage PipeWire audio, like qpwgraph. This allows me to visualize all the input and output node of audio.
- Next, I fired up both the app and the game. And soon enough, three new nodes appeared:
- The output node of the game (which, in this case, was Baba is You), connected to my Headphones (which was USBC Headset Analog Stereo)
- Steam's input node, which is used to capture audio and put into the Game Recording, being connected to my Headphones's monitor node, which means that the entire Headset's audio were being piped into Steam.
- Then, I just disconnect the pipe between my Headset and Steam, and then connect Baba is You's audio stream to Steam.
And that's it. That's all it took, to capture audio just from the game.
It seems pretty simple to just capture audio from the game only. So I wonder why hasn't Steam on Linux been able to do this yet.
Now, I'm not saying that this is easy to just implement. I'm not a dev at Steam, nor am I someone who contributed to PipeWire, so maybe this is actually way harder to implement in practice for Valve.
But either way, I'm making this post just to show how possible it is to capture game audio only in Steam's Game Recording. Maybe someone on this sub or on some forums have already figured this out, but this is pretty new knowledge to me, so I thought I'd share it here:)