From Bitpost wiki

Capture computer audio

If you want to record what the computer is playing on linux, you can open the sound mixer (pnmixer, the applet should be running, open "mixer"). Then AFTER YOU START RECORDING, you can change the input for the recording to "Monitor of Built-in Audio Analog Stereo", for CRYSTAL CLEAR recording of current audio whatever it is.


Get it with apt.

On windows, you might need this.