While you're here, please consider supporting GamingOnLinux on:
Reward Tiers:
Patreon. Plain Donations:
PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers:
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Linaro reveal they're collaborating with Valve for the Steam Frame
- Steam Frame and Steam Machine will be another good boost for Flatpaks and desktop Linux overall too
- Canonical call for testing their Steam gaming Snap for Arm Linux
- Valve update the Steam Workshop to allow mods to support multiple game versions
- SteamOS 3.7.20 adds the ntsync driver to help improve some game performance
- > See more over 30 days here
- Game recommendation?
- JSVRamirez - Weekend Players' Club 2026-01-09
- Minoscereb - Will you buy the new Steam Frame?
- Arehandoro - Welcome back to the GamingOnLinux Forum
- Liam Dawe - Does anyone game and capture card on linux mint?
- LoudTechie - See more posts
How to setup OpenMW for modern Morrowind on Linux / SteamOS and Steam Deck
How to install Hollow Knight: Silksong mods on Linux, SteamOS and Steam Deck
View PC info
You can see your Pulse sinks like this:
pactl list short sinks
49 alsa_output.pci-0000_0f_00.1.hdmi-stereo-extra4 PipeWire s32le 2ch 48000Hz SUSPENDED
50 alsa_output.pci-0000_11_00.4.iec958-stereo PipeWire s32le 2ch 48000Hz RUNNING
Firstly, I'm using my digital output for audio already.
In my case it's alsa_output.pci-0000_11_00.4.iec958-stereo (S/PDIF output). s32le means audio format is signed 32-bit little endian. 2ch means it has two channels and 48000 Hz is the sample rate.
Now you can simply capture it using parec like this (note .monitor suffix for it):
parec --device='alsa_output.pci-0000_11_00.4.iec958-stereo.monitor' \--rate=48000 \
--file-format=flac > theme.flac
By default parec records in 44100 Hz, 16 bit depth and native endianness. I suppose to avoid resampling, you can match sample rate to the native sink one (48000 Hz in my case). FLAC only supports 16 and 20 bit depth, and parec's default 16 is perfectly enough, so no need to change that.
That's all :)
Once I recorded the theme I had to trim it a bit in Audacity to make it loopable.
Last edited by Shmerl on 21 Apr 2022 at 5:52 pm UTC
View PC info
Get the list of targets first:
pw-record --list-targets
Available targets ("*" denotes default): alsa_input.usb-046d_C922_Pro_Stream_Webcam_D7C1577F-02.analog-stereo
* 47: source description="C922 Pro Stream Webcam Analog Stereo" prio=2009
34: monitor description="Starship/Matisse HD Audio Controller Digital Stereo (IEC958)" prio=736
48: monitor description="Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] Digital Stereo (HDMI 5)" prio=584
81: stream description="mpv" prio=-1
You can also get some more info with:
pw-cli list-objects NodeGet currently used format of the sink, which in my case is 34 for digitial S/PDIF output. You can get a better idea which is which from pw-cli list-objects Node.
pw-cli enum-params 34 Format
Object: size 160, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:Format (4)
Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
Id 1 (Spa:Enum:MediaType:audio)
Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
Id 1 (Spa:Enum:MediaSubtype:raw)
Prop: key Spa:Pod:Object:Param:Format:Audio:format (65537), flags 00000000
Id 267 (Spa:Enum:AudioFormat:S32LE)
Prop: key Spa:Pod:Object:Param:Format:Audio:rate (65539), flags 00000000
Int 48000
Prop: key Spa:Pod:Object:Param:Format:Audio:channels (65540), flags 00000000
Int 2
Prop: key Spa:Pod:Object:Param:Format:Audio:position (65541), flags 00000000
Array: child.size 4, child.type Spa:Id
Id 3 (Spa:Enum:AudioChannel:FL)
Id 4 (Spa:Enum:AudioChannel:FR)
Note S32LE, 48000 and 2 channels. Same info we got from pactl before.
Just for the reference, to list all supported formats of the sink, you can use:
pw-cli enum-params 34 EnumFormatThen you can actually record:
pw-record --target 34 --rate=48000 --format=s16 --channels=2 audio.wavThis can be simplified, since 48000 Hz, s16 and 2 channels are defaults:
pw-record --target 34 audio.wavCurrently it only supports recording a WAV file.
Last edited by Shmerl on 24 Apr 2022 at 8:28 am UTC