Solved How to record audio from computer

Sorry for the delay, I had to reinstall FreeBSD, I will try this now.
Do you now how to compile multimedia/ffmpeg? There was error with libxvid before the reinstall and on the fresh install again
 
Here are the results now:

sndstat:

Code:
pcm4: <Realtek ALC1200 (Analog 7.1+HP/2.0)> (play/rec) default
pcm5: <Realtek ALC1200 (Rear Digital)> (play)
pcm6: <Realtek ALC1200 (Onboard Digital)> (play)
pcm7: <Realtek ALC1200 (Rear Analog)> (rec)

dmesg | grep hdaa:

Code:
pcm4: <Realtek ALC1200 (Analog 7.1+HP/2.0)> at nid 20,22,21,23,27 and 25 on hdaa4
pcm5: <Realtek ALC1200 (Rear Digital)> at nid 30 on hdaa4
pcm6: <Realtek ALC1200 (Onboard Digital)> at nid 17 on hdaa4
pcm7: <Realtek ALC1200 (Rear Analog)> at nid 24,26 on hdaa4
 
Intel hda sound specification can be hard "wired" by manufacturers differently. Sometimes pins are left unused. In a simple system only one set of pins is used.

There are 2 ways the forum can help you determine how your system is wired.

1) Supply the make/model of your system. This is provided in the initial portion of the dmesg
The initial portion of my OpenBSD dmesg
Code:
OpenBSD 5.8 (GENERIC.MP) #0: Mon Nov  9 12:41:37 PST 2015
    jsh@PooBear.home.yak:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4278059008 (4079MB)
avail mem = 4144513024 (3952MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0000 (54 entries)
bios0: vendor Phoenix Technologies, LTD version "6.00 PG" date 10/01/2008
bios0: BIOSTAR Group A780X-A2

From the above, one can tell the OS version (OpenBSD 5.8), the BIOS version(Phoenix LTD 6.00) and the Make/model of my motherboard (BioStar A780X-A2).

2) When you make entries boot/device.hints and /etc/sysctl.conf, the final output in the dmesg will change. It is usually best to start with unmodified verbose dmesg output, make incremental modifications repeating the verbose dmesg output with each change.

3) I would not install alsa, pulse, jack at this point - you will just add another layer of code complexity which will not fix the underlying problem.
 
Thank you for your help shepper

Here is for FreeBSD version

Code:
FreeBSD 10.2-RELEASE-p9 #0: Thu Jan 14 01:32:46 UTC 2016
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512

and here the result from dmidecode, is there what you expected?
 
The dmidecode output was helpful. You have an AsusTek P5Q motherboard and are using the onboard sound system. The linked specifications show something interesting, the motherboard has onboard sound suppression. In Aviation, noise cancelation headsets have a small external mic that picks up engine noise and phase shifts it about 180 degrees for noise cancellation. If the P5Q has the same thing it would need an extra microphone.

I search the forums and Google with your make and model for FreeBSD sound problems and came up empty. You might want to check your Bios to see if you can toggle the onboard sound suppression off while you trouble shoot this.

If there is not a bios setting for the sound suppression, you may want to email the snd_hda maintainer, Alexander Motin. His email and information that you can supply them is listed in the FreeBSD Sound Wiki. I am not aware that any current motherboards use sound suppression, it may be a troublesome feature.
 
There is no option to disable onboard sound suppression. But there is an menu:
SPDIF_OUT Mode Setting with two options (spdif or hdmi) set to SPDIF. the description say
Code:
If the VGA card has hdmi output and need to use SPDIF signal from SPDIF_OUT header, you need to change HDMI output for HDMI Audio Output
And i see from # cat /dev/sndstat that there is an hdmi output:
Code:
pcm0: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT440 (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC1200 (Analog 10ch/2.0)> (play/rec) default
pcm5: <Realtek ALC1200 (Rear Digital)> (play)
pcm6: <Realtek ALC1200 (Onboard Digital)> (play)
pcm7: <Realtek ALC1200 (Rear Analog)> (rec)
Is that the problem does not come from there?
 
I don't have a microphone. Just 2 speakers + basse box on the green. But what i want is recording the sound from the line-in, sound from internet, from my computer to a file.
That are different things. The method to record sound from the internet is not going to record sound from line line-in.
I think we need to use different approaches here.
 
It should be possible to record playback from line out but Crivens makes a good point. There are legal internet sites (depending on which country you reside in) that provide audio/video files. In the U.S. Archive.org is one. You can download these files directly and use audio/ffmpeg to convert. Another alternative is to use www/youtube-dl and then convert/extract the audio with ffmpeg. Some applications also have a record option for internet streams, audio/streamripper and there are some command line tricks to redirect output into a file.
 
This is not a matter of conversion. ffmpeg I already know. I speak about any sound (Internet or other) in my computer.
I do it in a slackware installed on the same machine with alsa and jack and that works.
Here is not a question of rights, this is not about download, but recording in my own computer.

But can you tell me about hdmi, can i change the value in the bios without any damage?
 
There's progress. Here's a record screenshot with sound source from vlc. The sound is very bad, but source is detected. It's a good start. now, it would be necessary that I have a line-in i suppose. It is thanks to you shepper, I partially solved this problem
 
I have no idea as to why that helped but glad something worked o_O
I recall some forum posts about poor recording quality and that tweaking sampling rates helped. You can use the forums search feature.
 
Perhaps indirectly, but you helped me anyway. It would be interesting to understand why this works with HDMI ... Is there a relationship with NVIDIA?
However, At this stage we can consider this thread as resolved as it works now for me.
 
On my NetBSD, I just have to enter this mixerctl -w inputs.record2.mute=off;mixerctl -w inputs.reclvl2.mute=off and I can record my desktop audio, very simply. On FreeBSD, I'm still fighting to find a way to record desktop audio without to use ALSA nor PulseAudio, only OSS.
 
Back
Top