You are not logged in.
Pages: 1
Topic closed
I record Let's Plays and wanted to record them with recordmydesktop.
I first tried to record using ALSA but after reading much threads about that problem I decided to use pulseaudio because it seems to be easier.
But I want ALSA back so I decided to ask here if anyone knows a solution for the ALSA sound server.
Can anyone help me?
Last edited by TheRatze94 (2012-08-31 19:25:42)
Offline
Ha, ha, ha, ha, ha.
No seriously, the only thing that helps you is a good soundcard and I don't mean these pseudo-onboard-soundcards. But even then...
Let's say: Good luck.
Offline
Your answer is not very helpful.
I didn't ask which soundcard is the best.
I just wanted to know if anyone knows a way to record the internal audio using the ALSA soundserver.
Pulseaudio is just making problems and i want to get rid of it.
Offline
modprobe snd-aloop
should give you another virtual sound card with an input connected to an output.
Then set up a /~.asoundrc that let you play the stream to the loopback interface and the real speakers too, i used this in the past and it worked:
pcm.!default {
type asym
playback.pcm "LoopAndReal"
#capture.pcm "looprec"
capture.pcm "hw:0,0"
}
pcm.looprec {
type hw
card "Loopback"
device 1
subdevice 0
}
pcm.LoopAndReal {
type plug
slave.pcm mdev
route_policy "duplicate"
}
pcm.mdev {
type multi
slaves.a.pcm pcm.MixReale
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
pcm.MixReale {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
pcm.MixLoopback {
type dmix
ipc_key 1025
slave {
pcm "hw:Loopback,0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
Last edited by kokoko3k (2012-08-31 20:00:00)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Thank you for your answer kokoko3k.
For some reason I get the message, that there was an error while opening/configuring the soundcard.
I've done exactly what you wrote after uninstalling the pulseaudio sound server.
Have you got an idea what I could have done wrong?
Offline
When and where do you get that message?
What does it says exactly?
Please, post the output of
aplay -l
--EDIT (just guessing...)
If you modprobed snd-aloop at system boot via /etc/modules-load.d/something.conf it is possible that snd-aloop has got priority over your real sound card so that card #0 is the loop and card #1 is the real one.
In that case, you may want to edit/create: /etc/modprobe.d/sound.conf to fix indexes:
# cat /etc/modprobe.d/sound.conf
options snd_hda_intel index=0
options snd_aloop index=1
Change hda_intel with the module that manages your soundcard.
Last edited by kokoko3k (2012-08-31 13:22:25)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
The message appears when I try recording using gt-recordmyDesktop.
It's german, but it says that there was an error while opening/configuring the soundcard.
[ratze@ratze ~]$ aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: SB [HDA ATI SB], Gerät 0: ALC887 Analog [ALC887 Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: SB [HDA ATI SB], Gerät 1: ALC887 Digital [ALC887 Digital]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: HDMI [HDA ATI HDMI], Gerät 3: HDMI 0 [HDMI 0]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 2: Loopback [Loopback], Gerät 0: Loopback PCM [Loopback PCM]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Karte 2: Loopback [Loopback], Gerät 1: Loopback PCM [Loopback PCM]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Offline
You're right, i've modified the .asoundrc in the previous post, please try again and make sure gtk-recordmydesktop
will record from looprec
I tested it right now, and works good.
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Thank you very much kokoko3k!
Now it works perfectly
Offline
kokoko3k, I would like to give a big THANK YOU to you because the simple instructions you posted worked FLAWLESSLY the first time I tried it. I had previously spent over TWO WEEKS trying to get Jack set up with GTK-RMD but to no avail. As a matter of fact, to show my appreciation, I actually registered just for this post. I am a Debian user with around two years experience lol.
Offline
You're welcome sagirfahmid3, but as far a si remember, it was just a copy/paste from different .asoundrc i spotted around
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Wow, thanks, this worked perfectly!
Offline
Wow guys this is a great thread. I was looking for a way to do this for a while now!
Thanks!
Regards.
Andrzej
The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.
Offline
Hello, thanks for this thread and replying to it too, I have been dreaming for years to be able to record from onboard sound without having to install pulseaudio.
I followed both instructions by kokoko3k but get the error message:
$ speaker-test
speaker-test 1.0.26
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Playback open error: -16,Device or resource busy
My alsa-info: http://www.alsa-project.org/db/?f=c8774 … 4debc03513
Hopefully you can help me and whoever else has this problem.
Offline
Thanks @kokoko3k, your solution works perfectly. I just recorded internal audio with Audacity by selecting the looprec device.
Offline
FYI there is another methog - to use the `tee` or `file` alsa pcm device. See this section in audacity wiki:
http://manual.audacityteam.org/o/man/tu … A_PCM_file
Basically you create an alsa device like one of the below pcm devices and then set it as default or play only particular programs through it. You don't even have to use a recording program which is nice:
pcm.teeraw {
type empty
slave.pcm "tee:default,'/tmp/out.raw',raw"
# 48000 S16_LE 2ch (aplay -t raw -f dat)
}
pcm.teewav {
type copy
slave.pcm "tee:default,'/tmp/out.raw',wav"
}
pcm.teemp3 {
type file
format "raw"
slave.pcm "default"
file '|/usr/local/bin/lame -S -r -s %r --bitwidth %b -m j - /tmp/asound-$$.mp3'
}
Last edited by avalon (2013-12-12 08:38:29)
Offline
The drawback of the latter is that one have to choose the output alsa device everytime, the former is more like a "set it and forget it" method
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Both have upsides and downsides. For example when you record something you usually don't want to record your skype and other IM notifications or whatever program decides to output noises at the time. So when recording I usually set the program to use a particular PCM.
Offline
modprobe snd-aloop
should give you another virtual sound card with an input connected to an output.
Then set up a /~.asoundrc that let you play the stream to the loopback interface and the real speakers too, i used this in the past and it worked:
After setting up asoundrc like this I got the behaviour when only one application can use ALSA at a time. Some can be restarted to get sound, for the others it doesn’t help. Thanks
Offline
Also CPU load by MPD goes 100% on one core every time.
Offline
Please don't necrobump, frg; especially when the thread is marked as solved.
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed