Recording internal sound of computer

I want to record sound output of a laptop.
No microphone. No fan noise or external sound.
For example I watch an online video, or audio, and while listening, I want to record it as a file.

I heard this can be done with audacity.
If so, how?
Would anyone know I’m doing this, the sites where I copy sound from,
or will audacity report it somewhere?
Nothing commercial or unethical, but I still don’t want this to be known, or provable.
Would the output file contain any “evidence” of such recording?

I have audacity 2.05. Also plan to install current version on another linux laptop.
Any difference between them, in terms of sound quality of the output file?

unrelated /offtopic:
On the earphone I hear great sound, but on my car, some deep bass sounds
become ugly. Can this be related to recording to CD, rather than weakeness of my car audio (10 year old car).

another unrelated: Does mixing sound, drop quality of each sound?

Select WASAPI as the recording device in Audacity …
https://manual.audacityteam.org/man/tutorial_recording_computer_playback_on_windows.html


The weakness is probably in the headphones: they’re not reproducing bass sounds, the car-stereo is.

See here: Tutorial - Recording Computer Playback on Linux - Audacity Manual


All versions of Audacity use 32-bit float format internally. The sound quality is limited by the quality of the sound source and the format that you choose for your finished work (compressed formats such as MP3 will slightly reduce the sound quality).


You clearly need to buy a new Mercedes :mrgreen:
(only joking)
Do you mean commercially bought CDs, or ones that you have made yourself?

Not for Linux. That’s Windows only.

@ overlap , I notice that your profile says that you use Mac, but you are posting on the Linux board. Is your usual operating system Linux?

Thanks for replies.

I only use linux.

I record music onto CDs using k3b of kubuntu.
If this is a bad idea (in sound quality sense) please let me know.

Looks like I didn’t get final answer for the main question:
how to record internal sound (streaming video’s sound, etc).

(could ask the same question for videos…)

Also need to install new audacity to the other laptop, but I get error. I want to use kubuntu repository and not be
tricked into installing something different (such as a fake version).

I’ve updated your profile for you.


k3b is a good CD burning app. No problem there.


I replied with a link to the detailed instructions in the manual: Tutorial - Recording Computer Playback on Linux - Audacity Manual

What is the error?

I tried

sudo apt-get install audacity
,
it said something like (I forgot but can check later…)
no such package, and/or it is part of another package.

Please check.
“sudo apt-get install audacity” will usually install Audacity, but I’m guessing that something is stopping it.

Ok, it is hard to follow.
Tried two methods mentioned on that page.

1st metod (with audacity):

I’m stuck at this step:

  1. Open PulseAudio Volume Control and choose the “Recording” tab.

How do I do it, where is PulseAudio Volume Control, how do I open it.

Also there is a big red Record button, why is it there, I mean, when I click it, audacity
seems to record something, but the result is a silent file.
Am I supposed to make some preparations first, or is it something which I will never use.

I plan to record sound coming out of Chromium browser directly.


2nd method (without audacity)

There is another method there (without audacity) but it is equally more difficult to use.
…instructions below:
USING ALSA PCM FILE
…First you need to create (or if it already exists, add to the end of the file) ~/.asoundrc file. Do it with your favorite plain text editor. Note: ~ is your home directory so change that to /home/john or whatever if you are not working in a Linux shell.

pcm.teeraw {
type empty
slave.pcm “tee:default,‘/tmp/out.raw’,raw”

48000 S16_LE 2ch (aplay -t raw -f dat)

}
Now tell the application from which you are trying to record to use the “teeraw” ALSA device for playback - read the application’s manual for help. Although there is no interface to do this for Adobe Flash, it can be achieved by setting the FLASH_ALSA_DEVICE environment variable to the name of the sound device to use, for example:

FLASH_ALSA_DEVICE=teeraw firefox
Thanks to wensley.org for this tip.

Run the application. Stop the application. Now /tmp/out.raw should contain your sound with perfect quality.

I Don’t have flash…I created the file: ~/.asoundrc , under home directory, with contents as above.
I use the command above, replacing firefox with chromium-browser:

FLASH_ALSA_DEVICE=teeraw chromium-browser

This command runs Chromium Browser. So I did RUN part. Played some sound on chromium. Closed Chromium Browser (did STOP application part).
And yes, a file: /tmp/out.raw , has been created. But it is an empty file. What am I doing wrong?

first create a file, and run the command , play some music with that application (chromium), and turn off the browser. file is created, but it is empty.

That depends which version of Linux you have.
In Xubuntu I can open PulseAudio Volume Control by clicking on the loudspeaker icon in the task panel, then select “Mixer”.
In all versions of Linux it can be opened (assuming it is installed) from the command line (from a Terminal window) with the command:

pavucontrol

(Using kubuntu 14, and plan to use kubuntu 20.)
I can’t locate “it”. Here is a screenshot of my audacity.


(Also I would very much appreciate any hints which may explain what I’m doing wrong
in direct (audacityless) recording (2nd option: bottom part of the long message).)

If by “it” you mean “PulseAudio Volume Control”, then it isn’t part of Audacity. It’s a mixer for PulseAudio (the standard Linux Sound system).
What happens when you run pavucontrol in a Terminal window?

I would be very cautious about using ~/.asoundrc or modifying the sound system - it’s too easy to mess up the sound system.
There’s a lot of old information on the Internet about ways to modify the sound system - most of it should be ignored because it relates to the days before PulseAudio (or the early days of PulseAudio when many Linux distros made a complete mess of it).

Here it is. There are some errors as you see in the image, not sure if
they are important. … I will give it a try.

They are probably not important.

Thanks.

It looks like

  1. sound quality drops a little bit.
  2. file size is up 10 percent.

other noises were blocked, for example event sound volume made zero.
Tested with kaffeine.
Played a wav file, recorded as wav file, trimmed empty ends.
After recording, file size is up.
Only real difference must be volume, which is just a vertical scaling.
It shouldn’t affect “complexity” of the file.

Looks like each playing drops sound quality a little bid, correct?
Direct recording might be better.
I can create a new user for this purpose.

The website where I would copy from, claimed, it is not possible
to download sounds. I didn’t say, “even with audacity?”. …

I’m not sure how reliable browser extensions are, but there are many reasons to believe
they don’t respect privacy. (another method not discussed here…)