How to record what the PC is playing?

New to Puppy and have questions? Start here

Moderator: Forum moderators

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

How to record what the PC is playing?

Post by number77 »

Hello
I would like to record some audio I have playing on the PC in digital quality. Has anyone succeeded or got any advise.
I have asked this a few times and either forgotten, quite possible, or never had any success.
I have a Dell E6230 with Xenial64 and other Puppy OSs, but will try any Puppy that would help.
Help appreciated.
number77

User avatar
rockedge
Site Admin
Posts: 5897
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2122 times
Been thanked: 2228 times
Contact:

Re: How to record what the PC is playing

Post by rockedge »

I do it a lot with Audacity. It runs well in Puppy Linux and KLV and the DebianDog's.

Some machines have sound cards that will allow direct recording via loop and on other machines I use a jumper cable to a Y connector from audio out to Y connector to audio in.

Export to mp3, wav or flac (I think). I think there is a portable around.

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

Yes, audacity is nice for that purpose (although there are more suitable programs), check and adjust the level so it doesn't clip, but shouldn't be very soft / low either.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

rockedge wrote: Thu Jun 02, 2022 5:01 pm

I do it a lot with Audacity. It runs well in Puppy Linux and KLV and the DebianDog's.

Some machines have sound cards that will allow direct recording via loop and on other machines I use a jumper cable to a Y connector from audio out to Y connector to audio in.

Export to mp3, wav or flac (I think). I think there is a portable around.

Thanks rockedge, the audio out is not always brilliant quality as mine at least is designed for laptop speakers and not good.
I really would like to record the digital sound as it goes on to the pc soundcard.
I do use and like Audacity though.

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

number77 wrote:

I really would like to record the digital sound as it goes on to the pc soundcard.

I think when you configure the mixer (e.g. Alsamixer) or/and Audacity to record from the PC output (often called something like "stereo-mix" (and "loopback" should be enabled, I guess)) then it IS as you like (digital sound as it goes on to the pc soundcard).
But anyone correct me if I'm wrong, please.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

fredx181 wrote: Thu Jun 02, 2022 5:49 pm
number77 wrote:

I really would like to record the digital sound as it goes on to the pc soundcard.

I think when you configure the mixer (e.g. Alsamixer) or/and Audacity to record from the PC output (often called something like "stereo-mix" (and "loopback" should be enabled, I guess)) then it IS as you like (digital sound as it goes on to the pc soundcard).
But anyone correct me if I'm wrong, please.

Thanks
I cannot find stereo mix in audacity. Have enabled loopback.

User avatar
rockedge
Site Admin
Posts: 5897
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2122 times
Been thanked: 2228 times
Contact:

Re: How to record what the PC is playing

Post by rockedge »

I wonder if @wiak's WEX would be of any use?

User avatar
rcrsn51
Posts: 1273
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 296 times

Re: How to record what the PC is playing

Post by rcrsn51 »

number77 wrote: Thu Jun 02, 2022 4:27 pm

I would like to record some audio I have playing on the PC in digital quality.

What is the source of this audio?

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

number77 wrote: Thu Jun 02, 2022 6:04 pm
fredx181 wrote: Thu Jun 02, 2022 5:49 pm
number77 wrote:

I really would like to record the digital sound as it goes on to the pc soundcard.

I think when you configure the mixer (e.g. Alsamixer) or/and Audacity to record from the PC output (often called something like "stereo-mix" (and "loopback" should be enabled, I guess)) then it IS as you like (digital sound as it goes on to the pc soundcard).
But anyone correct me if I'm wrong, please.

Thanks
I cannot find stereo mix in audacity. Have enabled loopback.

How about your mixer utility, e.g Alsamixer Retrovol ... you may see something like stereo mix, for me on my HP laptop, using Alsamixer, Stereo M and loopback enabled:

Attachments
debdog-20220602202658.jpg
debdog-20220602202658.jpg (78.83 KiB) Viewed 1938 times
number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

rcrsn51 wrote: Thu Jun 02, 2022 6:22 pm
number77 wrote: Thu Jun 02, 2022 4:27 pm

I would like to record some audio I have playing on the PC in digital quality.

What is the source of this audio?

The source is any live stream from the internet that is allowed. IE not BBC iplayer as it is restricted so not for that.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

fredx181 wrote: Thu Jun 02, 2022 6:34 pm
number77 wrote: Thu Jun 02, 2022 6:04 pm
fredx181 wrote: Thu Jun 02, 2022 5:49 pm

I think when you configure the mixer (e.g. Alsamixer) or/and Audacity to record from the PC output (often called something like "stereo-mix" (and "loopback" should be enabled, I guess)) then it IS as you like (digital sound as it goes on to the pc soundcard).
But anyone correct me if I'm wrong, please.

Thanks
I cannot find stereo mix in audacity. Have enabled loopback.

How about your mixer utility, e.g Alsamixer Retrovol ... you may see something like stereo mix, for me on my HP laptop, using Alsamixer, Stereo M and loopback enabled:

My alsamixer is old. only 1.1.1 so I will try and get 1.1.8 as stereo mix not in 1.1.1

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

Perhaps you need to press F5 (ALL) in Alsamixer.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

fredx181 wrote: Thu Jun 02, 2022 6:56 pm

Perhaps you need to press F5 (ALL) in Alsamixer.

No I did have F5 pressed, not there. Also not there in Fossapup which has 1.2.1

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

number77 wrote: Thu Jun 02, 2022 7:07 pm
fredx181 wrote: Thu Jun 02, 2022 6:56 pm

Perhaps you need to press F5 (ALL) in Alsamixer.

No I did have F5 pressed, not there. Also not there in Fossapup which has 1.2.1

Then it may be called different, if nothing there I'm out of ideas.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

fredx181 wrote: Thu Jun 02, 2022 7:20 pm
number77 wrote: Thu Jun 02, 2022 7:07 pm
fredx181 wrote: Thu Jun 02, 2022 6:56 pm

Perhaps you need to press F5 (ALL) in Alsamixer.

No I did have F5 pressed, not there. Also not there in Fossapup which has 1.2.1

Then it may be called different, if nothing there I'm out of ideas.

Thanks anyway, if you think of anything.

User avatar
rcrsn51
Posts: 1273
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 296 times

Re: How to record what the PC is playing

Post by rcrsn51 »

How are you playing these live streams? Through a web browser? Through a media player like VLC?

Do you have an URL that directly accesses the stream?

If you have the URL, some media players can directly capture the stream. For example:

Code: Select all

mplayer  -dumpstream http://sc2.yul.llnw.net:80/stream/cbcmp3_cbc_r1_ldn
mplayer stream.dump
User avatar
mikewalsh
Moderator
Posts: 5698
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 616 times
Been thanked: 1759 times

Re: How to record what the PC is playing

Post by mikewalsh »

I actually have this same issue myself.

Ever since moving to this new HP rig, the sound card simply WILL not capture 'internal' audio.

I have 'Loopback' mixing showing in both Alsamixer & Retrovol, in all Puppies, AND it's enabled.....but it simply doesn't do anything. Any attempt to record audio from either the 'net OR a built-in media player just results in a blank, empty file.

It's fine capturing live 'spoken' audio from my headset microphone, or anything from the webcam's stereo mikes.....but for anything where the audio originates from 'within' the system, it's a no-go.

I did have the issue with the old Compaq rig for a while, but that was traced back to the elderly, 'stripped-back' versions of ffmpeg Puppy used to ship with by default. Ever since making sure I used up-to-date versions of ffmpeg, it fixed that. But not on this new rig.

I've pretty much given up on ever being able to record with this one. Audacity, mHWaveEdit, Bacon audio-recorder.....it matters not what I try, 'cos nothing works.

So where am I going wrong, guys? What silly little item have I overlooked?

Mike. :?

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
norgo
Posts: 255
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 5 times
Been thanked: 94 times
Contact:

Re: How to record what the PC is playing

Post by norgo »

Here an example how to use a loopbackdevice to transfer audio-streams.
Okay this example is a bit useless because audacious could record the audio-stream too.
But this example will show you how it works.
The only thing you have to do is to load the kernelmodule snd-aloop
Video: transfer_via_loopbackdevice.mkv

User avatar
bigpup
Moderator
Posts: 6468
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: How to record what the PC is playing

Post by bigpup »

pMusic
https://forum.puppylinux.com/viewtopic.php?t=5801

Try using pMusic -> PlayQueue -> Export Tracks in Queue.....

The Export operation will save all supported files/streams in the list. If chosen, the output file can be converted to another format/quality.
Middle-click on file to remove it from the list.

Grab radio-stream
If the stream contains meta-data (most do), each song (file) is named with the recieved Artist - Title information.
A more comprehensive grabber is found in the Tools menu.

Rip CD-audio
pMusic will try to grab CD-disc information from the internet. You can decide which part of the info to use for naming of the copied tracks.
%a - Artist
%A - Album
%n - Track-number
%t - Title

There are several other ways to turn what you are listening to into stored files.
Example:
Radio streams can use Radio Grabber.

WARNING:
After installing pMusic before using it.
Do a check to make sure you have all needed support stuff. If not, install whatever is missing.
pMusic -> Help -> Dependency Check

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

rcrsn51 wrote: Thu Jun 02, 2022 8:24 pm

How are you playing these live streams? Through a web browser? Through a media player like VLC?

Do you have an URL that directly accesses the stream?

If you have the URL, some media players can directly capture the stream. For example:

Code: Select all

mplayer  -dumpstream http://sc2.yul.llnw.net:80/stream/cbcmp3_cbc_r1_ldn
mplayer stream.dump

I am not 100% sure but I think mainly from a browser. Browser would be preferable.
I can find the url of *rganlive.com, https://play.organlive.com:7010/320, and this will play in vlc so I can record that easily.
Other streams are not so easy to find, especially the local uk supplier.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

bigpup wrote: Thu Jun 02, 2022 10:50 pm

pMusic
https://forum.puppylinux.com/viewtopic.php?t=5801

Try using pMusic -> PlayQueue -> Export Tracks in Queue.....

The Export operation will save all supported files/streams in the list. If chosen, the output file can be converted to another format/quality.
Middle-click on file to remove it from the list.

Grab radio-stream
If the stream contains meta-data (most do), each song (file) is named with the recieved Artist - Title information.
A more comprehensive grabber is found in the Tools menu.

Rip CD-audio
pMusic will try to grab CD-disc information from the internet. You can decide which part of the info to use for naming of the copied tracks.
%a - Artist
%A - Album
%n - Track-number
%t - Title

There are several other ways to turn what you are listening to into stored files.
Example:
Radio streams can use Radio Grabber.

WARNING:
After installing pMusic before using it.
Do a check to make sure you have all needed support stuff. If not, install whatever is missing.
pMusic -> Help -> Dependency Check

Looks interesting, will try tonight.

User avatar
wiak
Posts: 3712
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 58 times
Been thanked: 1036 times
Contact:

Re: How to record what the PC is playing

Post by wiak »

mikewalsh wrote: Thu Jun 02, 2022 8:44 pm

I've pretty much given up on ever being able to record with this one. Audacity, mHWaveEdit, Bacon audio-recorder.....it matters not what I try, 'cos nothing works.

So where am I going wrong, guys? What silly little item have I overlooked?

Mike. :?

A partial answer to that is that it has nothing to do with the audio recording app. Rather it is a configuration of the underlying sound system issue, assuming that can be fixed.

I generally have more success with pulseaudio than I do with straight alsa, but that may be luck and dependent on the system I am using.
I will also try recording from 'soundcard' soonish since I don't think I've made any such recording on my newish HP laptop system as yet either. If it doesn't work though I will have a problem too since I know next to nothing about configuring underlying sound system aside from playing around with alsamixer settings (and sometimes following command: alsactl init) and, when applicable, those of pulseaudio (e.g. via pavucontrol). But the related text config files for all these... really I have no idea.

But my main point is that I doubt changing recording apps will make any difference to the situation. If one works, I imagine they all will (all things being equal).

EDIT: I too have no idea how to do it nowadays... Hopefully someone used to that sort of configuration will provide an answer (I tried but failed using KLV-Airedale on my new HP; will try with a WeeDogIT distro via Audacity or something since surely they have it all sorted out?).

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

One thing I don't understand.
In vlc and advanced settings I can play the organlive stream and record it. So it is possible to record what pc is playing.
The problem seems to come finding the url of what is playing.

User avatar
wiak
Posts: 3712
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 58 times
Been thanked: 1036 times
Contact:

Re: How to record what the PC is playing

Post by wiak »

Hmmm...

I got both audacity and precord recording from the 'speakers' (rather than the digital microphone on my HP), which is soundcard really, in both WDL_mintCin (Linux mint Cinnamon) and in KLV-Airedale after watching this youtube:

Mind you, I don't really know how I managed, but the key was to 'Monitor' the speakers and you first have to start audacity recording (from the microphone initially till you change to monitor speakers after which soundcard/speakers will be used and not the microphone).

and I needed pavucontrol per the youtube video instructions. It isn't 'straightforward intuitive though' - the microphone takes precedence and as I say you first have to get an app recording microphone so stream shows up in pavucontrol, and then in pavucontrol you can select Input Devices: All Input Devices and under recording make sure you are using the speakers (on my KLV and new HP laptop it comes up under pavucontrol 'Input Devices' as "Monitor of sof-hda-dsp Stereo") rather than microphone thereafter... Also, in KLV-Airedale, using Precord, I note that under pavucontrol Recording tab the stream is shown as "ALSA plug-in [aplay]: ALSA Capture". Bit different in WDL Linux Mint, where pavucontrol settings look more like in that youtube video. Sorry, a bit hazy, but I don't really know what I'm doing except able to report I am managing to record from monitored "Speakers" (but as I say the trick is to start the app recording and then play with these pavucontrol streams and Input Devices and so on). You can't arrange things by playing around with Audacity preferences - default for everything seems fine with that - it is as I suggested the underlying pulseaudio you have to set up via pavucontrol. Other pulseaudio config app I had by default on Linux Mint did not provide the necessary controls for me - I had to install pavucontrol (which is already in KLV-Airedale). Similarly, Precord just needs to be told to use pulse (as it is by default in KLV-Airedale; again it is the pavucontrol settings that matter...).

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
mikewalsh
Moderator
Posts: 5698
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 616 times
Been thanked: 1759 times

Re: How to record what the PC is playing

Post by mikewalsh »

@wiak :-

Like you, Will, I too suspect it's got summat to do with my hardware.....nowt to do with the software at all. It rather looks to me, researching it, that these particular Intel audio chips simply don't have a mixer channel at all, though I find that hard to believe with the overall predilection for multimedia displayed by most folks.

I'll continue to research it, though I would have expected to come across somebody else with the same problem before now. And I haven't.....

(*shrug*)

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

On my new Asus laptop I had initially the same problem, but found this (no pulseaudio needed, just Alsa):
https://bbs.archlinux.org/viewtopic.php?id=251591
Works for me by capturing the output with ffmpeg. It's assuming that the loopback device is hw:1,1 and the "normal" soundcard is hw:0,0, if it's different for you, you may need to change ~/.asoundrc accordingly (and the ffmpeg command probably).
Find your soundcard devices with aplay -l
The ffmpeg command I changed to 320K (as 32k is very bad quality):
ffmpeg -f alsa -i hw:1,1 -c:a libmp3lame -b:a 320k -vn capture.mp3
Or capture to .wav, just:
ffmpeg -f alsa -i hw:1,1 capture.wav

EDIT: Just see now that rcrsn51 posted an application https://forum.puppylinux.com/viewtopic. ... 729#p58729 didn't test yet.

User avatar
mikewalsh
Moderator
Posts: 5698
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 616 times
Been thanked: 1759 times

Re: How to record what the PC is playing

Post by mikewalsh »

@fredx181 :-

Any specific version of ffmpeg, Fred? I mostly use John van Sickle's static builds, as you know.

I take it this should work with any reasonably modern build, yes?

EDIT:- Errm..... According to aplay -l, I have two 'loopback' devices, each with 8 subdevices! That can't be right, surely? :?

And the only thing I have in ~/.asoundrc is something about 'pulse', apparently put in there by vokoscreen? (I don't even use PulseAudio, so I dunno what that's even doing there. Aside from that, I don't have a clue how to write this ALSA config stuff, I'm afraid...) :oops:

This is in Xenialpup 7.5 (32-bit). I actually have

Code: Select all

snd_aloop

.....being loaded at boot here. (Is that even the right module, 'cos I cannot see how I've got 16 'loopback' devices all of a sudden..?)

Mike. :|

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
fredx181
Posts: 2680
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 295 times
Been thanked: 1056 times
Contact:

Re: How to record what the PC is playing

Post by fredx181 »

Hi Mike, yes should work with newer ffmpeg.

EDIT:- Errm..... According to aplay -l, I have two 'loopback' devices, each with 8 subdevices! That can't be right, surely? :?

And the only thing I have in ~/.asoundrc is something about 'pulse', apparently put in there by vokoscreen? (I don't even use PulseAudio, so I dunno what that's even doing there. Aside from that, I don't have a clue how to write this ALSA config stuff, I'm afraid...)

I have also 8 subdevices , it should be ok, I guess.
Just replace your ~/.asoundrc with the content shown in the ArchLinux post (the answer), also you may need to restart the program that's playing the audio you want to record.
EDIT:

snd_aloop

Yes, that one should be loaded.

number77
Posts: 356
Joined: Tue Jul 14, 2020 3:14 pm
Has thanked: 4 times
Been thanked: 12 times

Re: How to record what the PC is playing

Post by number77 »

wiak wrote: Fri Jun 03, 2022 11:44 am

Hmmm...

I got both audacity and precord recording from the 'speakers' (rather than the digital microphone on my HP), which is soundcard really, in both WDL_mintCin (Linux mint Cinnamon) and in KLV-Airedale after watching this youtube:

I don't really want to record from the speakers as they are analogue so you can hear them with ears.
Also I didn't think digital microphones exist, they are analogue and need to be converted to digital with an analogue to digital converter for use on the pc. So inferior quality unless A/D converter costs a fortune. Not usually the case in PCs.
Thats why I want to record the digital stream on PC, not analogue.
My example of Organlive stream is a purely digital stream and vlc records digitally to be presented to a Good quality hifi Digital analogue converter.
Correct me if I am mistaken.

backi
Posts: 593
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 72 times
Been thanked: 68 times

Re: How to record what the PC is playing

Post by backi »

@number77 :
Just in Case.......
To run Pulseaudio/Pavucontrol as root you have to type into Terminal:
pulseaudio -D

Post Reply

Return to “Beginners Help”