Sound Card Output Recording

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
h3kt0r
Posts: 144
Joined: Fri Oct 08, 2021 6:27 pm

Sound Card Output Recording

#1 Post 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.
Dell OptiPlex 7010 - i7-3770 (8) @ 3.9GHz - 16Gb RAM - GeForce GT 1030 - MX 21
Panasonic CF MX4 - i5-5300U vPro (4) @ 2.9GHz - 4Gb RAM - HD Graphics 5500 - MX 21
Acer Aspire One ZG5 - Atom (2) @ 1.6GHz - 1.5Gb RAM - HD Gfx 945 - LXLE & XenialPup

Huckleberry Finn

Re: Sound Card Output Recording

#2 Post 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.

User avatar
Gaer Boy
Posts: 862
Joined: Sat Jun 06, 2009 6:06 am

Re: Sound Card Output Recording

#3 Post 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.

Gigabyte B550I Aorus Pro AX, Ryzen 5 5600G, 16GB, 250GB Samsung SSD (GPT), 2x1TB HDD (MBR), MX-21-AHS
Lenovo Thinkpad X220, dual-core i5, 4MB, 120GB Samsung SSD (GPT), MX-21

User avatar
h3kt0r
Posts: 144
Joined: Fri Oct 08, 2021 6:27 pm

Re: Sound Card Output Recording

#4 Post 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...
;)
Dell OptiPlex 7010 - i7-3770 (8) @ 3.9GHz - 16Gb RAM - GeForce GT 1030 - MX 21
Panasonic CF MX4 - i5-5300U vPro (4) @ 2.9GHz - 4Gb RAM - HD Graphics 5500 - MX 21
Acer Aspire One ZG5 - Atom (2) @ 1.6GHz - 1.5Gb RAM - HD Gfx 945 - LXLE & XenialPup

User avatar
h3kt0r
Posts: 144
Joined: Fri Oct 08, 2021 6:27 pm

Re: Sound Card Output Recording

#5 Post 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
Dell OptiPlex 7010 - i7-3770 (8) @ 3.9GHz - 16Gb RAM - GeForce GT 1030 - MX 21
Panasonic CF MX4 - i5-5300U vPro (4) @ 2.9GHz - 4Gb RAM - HD Graphics 5500 - MX 21
Acer Aspire One ZG5 - Atom (2) @ 1.6GHz - 1.5Gb RAM - HD Gfx 945 - LXLE & XenialPup

User avatar
h3kt0r
Posts: 144
Joined: Fri Oct 08, 2021 6:27 pm

Re: Sound Card Output Recording

#6 Post 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 &
Dell OptiPlex 7010 - i7-3770 (8) @ 3.9GHz - 16Gb RAM - GeForce GT 1030 - MX 21
Panasonic CF MX4 - i5-5300U vPro (4) @ 2.9GHz - 4Gb RAM - HD Graphics 5500 - MX 21
Acer Aspire One ZG5 - Atom (2) @ 1.6GHz - 1.5Gb RAM - HD Gfx 945 - LXLE & XenialPup

User avatar
Stevo
Developer
Posts: 14420
Joined: Fri Dec 15, 2006 7:07 pm

Re: Sound Card Output Recording

#7 Post 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.

User avatar
h3kt0r
Posts: 144
Joined: Fri Oct 08, 2021 6:27 pm

Re: Sound Card Output Recording

#8 Post 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...
Dell OptiPlex 7010 - i7-3770 (8) @ 3.9GHz - 16Gb RAM - GeForce GT 1030 - MX 21
Panasonic CF MX4 - i5-5300U vPro (4) @ 2.9GHz - 4Gb RAM - HD Graphics 5500 - MX 21
Acer Aspire One ZG5 - Atom (2) @ 1.6GHz - 1.5Gb RAM - HD Gfx 945 - LXLE & XenialPup

Stuart_M
Posts: 690
Joined: Wed Aug 07, 2019 7:10 pm

Re: Sound Card Output Recording

#9 Post 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

User avatar
h3kt0r
Posts: 144
Joined: Fri Oct 08, 2021 6:27 pm

Re: Sound Card Output Recording

#10 Post 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 !
Dell OptiPlex 7010 - i7-3770 (8) @ 3.9GHz - 16Gb RAM - GeForce GT 1030 - MX 21
Panasonic CF MX4 - i5-5300U vPro (4) @ 2.9GHz - 4Gb RAM - HD Graphics 5500 - MX 21
Acer Aspire One ZG5 - Atom (2) @ 1.6GHz - 1.5Gb RAM - HD Gfx 945 - LXLE & XenialPup

Post Reply

Return to “Tips & Tricks by users”