Page 1 of 1

Sound Card Output Recording

Posted: Wed Aug 03, 2022 2:01 am
by h3kt0r
I've been looking for an easy way to record the sound output from the onboard audio chipset. Searched the forums but could not find a solution, so...
You have to define the input device, or source, that will be used by default.
This is particularly useful when you want to regularly record the general audio stream (and not a particular external source).

The PulseAudio configuration file is to be copied to the $HOME via the following command:

Code: Select all

cp /etc/pulse/client.conf ~/.config/pulse/client.conf
Then, also in a terminal, the names of the available input devices are identified:

Code: Select all

pacmd list-sources | egrep 'index|name:|muted|device.description|active'
The command output is equivalent to what is displayed in the pavucontrol GUI under the "Input Devices" tab; the default source is the device associated with the physical connectors of the sound card (line-in, microphone, etc.), which is not necessarily appropriate to record soundcard output. To capture the internal audio stream by default, we modify the ~/.config/pulse/client.conf file:

Code: Select all

nano ~/.config/pulse/client.conf
By default, the line we are interested in is commented out :

Code: Select all

; default-source =
So it must be uncommented and completed with the name of the input device identified above; e.g. :

Code: Select all

default-source = alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Once saved, the change takes effect immediately, so there's no need to restart anything... especially the PulseAudio daemon.

Next step : install the "GNOME sound recorder" package.

Code: Select all

sudo apt-get install gnome-sound-recorder
Now you can record anything you want.

Re: Sound Card Output Recording

Posted: Wed Aug 03, 2022 5:46 am
by Huckleberry Finn
h3kt0r wrote: Wed Aug 03, 2022 2:01 am... could not find a solution...

Code: Select all

Package: audio-recorder
Version: 3.2.3-0.1~mx19+1
Priority: optional
Section: utils
Maintainer: Steven Pusser <stevep@mxlinux.org>
Original-Maintainer: Osmo Antero <osmoma@gmail.com>
Installed-Size: 732 kB
Depends: gstreamer1.0-libav, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-pulseaudio, pulseaudio, libappindicator3-1 (>= 0.2.92), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.4), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libdbus-1-3 (>= 1.9.14), libdbusmenu-glib4 (>= 0.4.2), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.45.3), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), libgtk-3-0 (>= 3.21.5), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0)
Homepage: https://launchpad.net/audio-recorder
Download-Size: 222 kB
APT-Manual-Installed: yes
APT-Sources: http://mxrepo.com/mx/repo buster/main i386 Packages
Description: Audio recorder for GNOME and Unity Desktops.
 This program allows you to record your favourite music or audio to a file.
 It can record audio from your system soundcard, microphones, browsers and
 webcams. Put simply; if it plays out of your loudspeakers you can record it.
 This program has a timer that can start, stop or pause recording on certain
 conditions such as audio level, file size and clock time. This recorder can
 automatically record your Skype calls. It supports several audio (output)
 formats such as OGG audio, Flac, MP3 and WAV.

Re: Sound Card Output Recording

Posted: Wed Aug 03, 2022 7:05 am
by Gaer Boy
I use Audacity a fair amount for sound editing and recording. A single click to monitor the sound stream lets me record all I can hear.

Re: Sound Card Output Recording

Posted: Wed Aug 03, 2022 4:27 pm
by h3kt0r
So, here are at least three solutions to record your sound card output.
Now pick the one that best fit your needs and start recording...
;)

Re: Sound Card Output Recording

Posted: Thu Aug 04, 2022 1:43 am
by h3kt0r
Here is a 4th option :
Launch pavucontrol and select the "Input Devices" tab. On this tab, select "All Input Devices" from the "Show" selection at the bottom.
Then click the green check mark beside "Monitor of Built-in Audio Stereo".
This has selected the internal audio as the source of your audio input so that any recording software will record it.
Then open a terminal and :

Code: Select all

arecord -f cd -t raw | oggenc - -r -o OutputFile.ogg

Re: Sound Card Output Recording

Posted: Fri Aug 05, 2022 3:46 pm
by h3kt0r
Another tip for audio recording !
This time, we need to "rip" the audio stream from an online radio.
To achieve this task, we need the "streamripper" package :

Code: Select all

sudo apt-get install streamripper
Then we write a small bash script to record (e.g.) this stream to disk :

Code: Select all

#!/bin/sh

# rips from <-- cliqhop -->
 
URL='https://somafm.com/cliqhop256.pls'
streamripper $URL -d ~/Downloads/Sound/Radio -u "FreeAmp/2.x" -q &

Re: Sound Card Output Recording

Posted: Fri Aug 05, 2022 4:12 pm
by Stevo
I guess it depends on your definition of "easy".

Audio Recorder can do all that with a couple of mouse clicks. Briefly, if you can hear it on the machine, that app can record it.

Re: Sound Card Output Recording

Posted: Fri Aug 05, 2022 4:34 pm
by h3kt0r
Well, i've just tried to install it via "GDebi" and it then appears in the menu.
BUT, when i execute it, nothing happens ?
Checking the task manager, the process is nowhere to be found...

Re: Sound Card Output Recording

Posted: Fri Aug 05, 2022 4:38 pm
by Stuart_M
I've been using audio-recorder for years. It is very easy to use and am 100% satisfied with it.



h3kt0r wrote: Fri Aug 05, 2022 4:34 pm Well, i've just tried to install it via "GDebi" and it then appears in the menu.
BUT, when i execute it, nothing happens ?
Checking the task manager, the process is nowhere to be found...
When you say "it", do you mean audio-recorder? If so, why did you try installing it with the GDebi Package Installer when it is available in the MX Package Installer (MXPI) and installs automatically afterwards?

In MX-19 it is in the Stable Repository and in MX-21 it is in the Test Repository (both v3.2.3).

To see its location run:

Code: Select all

which audio-recorder

Re: Sound Card Output Recording

Posted: Fri Aug 05, 2022 4:46 pm
by h3kt0r
Ooops, my bad !
I've used "Synaptics" since day 1.
Never used "MX Package Installer" yet...
Okay, i've just installed "audio-recorder" from the "MX Package Installer" and it works fine.
Thanks !

Re: Sound Card Output Recording

Posted: Mon Dec 05, 2022 5:04 am
by Sudhakarrdy
I have been using Audacity since 2011.
It serves me fine.