Recording game audio
Sometimes you don't want to record your microphone, but the audio from the game you're playing. There are two ways to do this: either through PulseAudio or through JACK.
PulseAudio is enabled by default on Ubuntu (except Lubuntu) and many other Linux distributions. PulseAudio works, but is sometimes unreliable and it still has some bugs that you may run into when you try to do more advanced things with it (such as the commands needed to record a game and a microphone at the same time). If you care about reliability and sound quality, I recommend using JACK instead. JACK is harder to set up, but I think it's worth it.
Using ALSA
To my knowledge, there is no reliable way to record the speakers in ALSA except by physically connecting the line out/headphone jack to the line in/microphone jack with a cable. It's primitive but it works very well, you just have to adjust the recording level in 'alsamixer' to get the volume right. You should also disable 'auto mute' if your speakers become muted when you plug in the cable.
Using PulseAudio
Recording only game audio
Assuming you have PulseAudio, you can follow these steps:
-
Run SimpleScreenRecorder.
-
Make sure that the audio backend is set to PulseAudio.
-
Select an audio source that starts with 'Monitor of'.
If you want to switch back, just select an audio source that is not a monitor.
Recording game audio and microphone at the same time
This method is know to be buggy and will likely result in some stuttering. Consider using JACK instead.
Credit goes to Joshua Hertlein for figuring this out. There are two ways to do this: the easy one and the hard one.
Hint
Before you do any of this, I highly recommend that you set the PulseAudio setting 'flat-volumes' to 'no', otherwise you won't be able to control the volume of applications individually (or at least not in a sane way). This seems to be the default setting in Ubuntu, but not in Arch Linux, so you may want to check this. To disable 'flat-volumes', add/modify this line in /etc/pulse/daemon.conf
flat-volumes = no
There is also a bug in PulseAudio that is triggered when PulseAudio switches between 44.1kHz and 48kHz audio. The fix should be released with the next version of PulseAudio (probably version 4.1). Until then, add/modify these lines in /etc/pulse/daemon.conf to work around this bug:
default-sample-rate = 48000 alternate-sample-rate = 48000
This will force PulseAudio to use only 48kHz (everything else is resampled as usual). This may increase CPU usage and reduce the audio quality, but the difference is very small.
After changing these settings, you should reboot so they can take effect (or just restart PulseAudio, but that will probably break your volume control).
The easy way
Tell PulseAudio to send audio coming from the microphone to the speakers, and record the speakers with SimpleScreenRecorder as explained above. The downside is that you will constantly hear your own voice which can be a bit distracting, and you should also set your speaker volume really low (or just use headphones) to avoid echo. But it is simple. Just run this command:
pactl load-module module-loopback
And when you're tired of listening to yourself, you can stop it again with this command:
pactl unload-module module-loopback
Note that the volume of the recording does not depend on your speaker volume. So even when you think the volume of the game sound is really low, it can actually be really loud in the final recording. You should reduce the volume of the game either in the game itself or with PulseAudio Volume Control, so your voice will still be audible. The preview in SimpleScreenRecorder can help you here, it shows the actual volume of the recording.
The hard way
Create null outputs and connect them with loopback streams so the game audio is sent to the speakers, but also combined with the microphone and sent to SimpleScreenRecorder. This is what we want to achieve:
To do this, run the following commands:
pactl load-module module-null-sink sink_name=duplex_out sink_properties=device.description=duplex_out pactl load-module module-null-sink sink_name=game_out sink_properties=device.description=game_out pactl load-module module-loopback source=game_out.monitor pactl load-module module-loopback source=game_out.monitor sink=duplex_out pactl load-module module-loopback sink=duplex_out
Now you should open PulseAudio Volume Control and send the audio from the game to the second null output (game_out), and set the audio source in SimpleScreenRecorder to the first null output (duplex_out). This should be done from the input page - do not use PulseAudio Volume Control to change the audio source for SimpleScreenRecorder because the change will be lost whenever you pause and resume the recording.
As with the previous method, you should probably reduce the volume of the game a bit, because it's usually very loud compared to the microphone volume.
When you're done, remove all the extra outputs and loopback streams with this command:
pactl unload-module module-loopback pactl unload-module module-null-sink
If you use this method a lot, then instead of running these commands manually, you can also configure PulseAudio to execute these commands automatically on startup. To do this, add the following to /etc/pulse/default.pa:
load-module module-null-sink sink_name=duplex_out sink_properties=device.description=duplex_out load-module module-null-sink sink_name=game_out sink_properties=device.description=game_out load-module module-loopback source=game_out.monitor load-module module-loopback source=game_out.monitor sink=duplex_out load-module module-loopback sink=duplex_out
Using JACK
Unlike PulseAudio, JACK must be configured manually, and while you're using it, you won't be able to use your normal audio system - everything has to go through JACK. So before you start, you should close all programs that could be using the sound system (this includes web pages with sound or video, often even when they are paused).
I recommend uninstalling PulseAudio if you are going to use JACK, because it will interfere with JACK (even when the PulseAudio daemon is not running).
Hint
JACK can be used with a normal ('generic') Linux kernel, but these kernels are not optimized for low latency. As a result, you will have to use a very large buffer to avoid xruns (stuttering). I recommend using a preemptive kernel or even a realtime kernel instead.
Linux distributions that are meant for audio processing will include a preemptive or realtime kernel by default, so there is nothing you should do. Arch Linux also comes with a preemptive kernel. On Ubuntu (and derivatives like Linux Mint), you can install a preemptive kernel with the following command:
sudo apt-get install linux-image-lowlatency linux-headers-lowlatency
After installing these packages, the preemptive ('lowlatency') kernel should show up in Grub when you restart the computer (it should be the default).
You should be able to get the latency down to 20ms or less with a preemptive kernel. You can go even further with a realtime kernel, but there is usually no need for that and it introduces unnecessary overhead.
Before you start, it's a good idea to configure your system to allow real-time threads. If you are using one of the Linux distributions meant for audio processing, this is probably already the default. If not, you have to edit the file /etc/security/limits.conf and add/edit these lines:
@audio - rtprio 80 @audio - memlock unlimited
This tells the kernel that users in the audio group can create real time threads and lock memory to RAM. These settings will make xruns less likely, so you can use lower latencies. It is not required but highly recommended.
Next you have to make sure that you are actually in the audio group. In a terminal, run the groups command to see what groups you are in. If it includes 'audio', you are fine. If not, run this command:
sudo usermod -a -G audio yourusername
This adds you to the audio group. You have to log out and log in again before it will take effect.
Before you can use JACK, you have to start the JACK server. The easiest way to do this is with the QJackCtl GUI, which you can install from the repositories. If you have a choice, I also recommend installing jack2 instead of jack1 - they are compatible, but jack2 performs better on multi-core systems. On Ubuntu, you can install all this with the following command:
sudo apt-get install qjackctl jackd2
Now open QJackCtl, and before you do anything else, click the settings button. Most of the default settings are fine, you just have to make a few changes:
-
Make sure that the 'realtime' checkbox is checked, and the 'no memory lock' checkbox is unchecked.
-
Set the same rate to 44100, because this is what SimpleScreenRecorder will use. Other sample rates will still work, but it's not very useful since SimpleScreenRecorder will resample it to 44100 anyway.
-
Set the period size to a reasonable value, for example 512 or 1024. Lower values will decrease the latency but increase the probability that you will get xruns (clicks or short interruptions in the audio). The best value highly depends on your sound hardware and how well the Linux drivers for that hardware perform. USB sound cards usually perform better here. With a special realtime kernel and the right hardware, you can get the latency down to a millisecond, but I don't recommend actually doing that: it introduces a lot of overhead, could cause xruns, and you probably won't be able to notice the difference anyway once the latency is 10ms or less.
-
Set the number of periods to 2. If that doesn't work properly, even with very large period sizes (i.e. you still get xruns), try 3 or 4 instead.
-
Set the number of input and output channels to 2, because SimpleScreenRecorder currently only supports stereo.
Once you've chosen your settings, click the 'start' button and wait a few seconds. If everything goes well, the status display should light up and contain only green and yellow text. If things go wrong (you get xruns), the text will turn red.
You should always make sure that JACK is running before you start any application that tries to use JACK, because they may try to start JACK themselves (in the background) which will confuse QJackCtl (if this happens, you have to find the jackd process and kill it manually).
You can test JACK with any application that has JACK support (for example Audacity). Most normal applications don't have JACK support though, so you will need what's called an ALSA-to-JACK bridge. There are two ways to do this. The classic method uses an ALSA loop device. It always works, but it adds a lot of latency which is annoying. You can read how to do it here, but I won't go into it because there is a much better solution: the JACK plugin for ALSA.
In order to use the JACK plugin for ALSA, you will have to create a file called .asoundrc in your home directory, with the following content:
# override default pcm.!default { type plug slave { pcm "rjack" } } # ALSA-to-JACK bridge pcm.jack { type plug slave { pcm "rjack" } hint { description "JACK bridge" } } pcm.rjack { type jack playback_ports { 0 "system:playback_1" 1 "system:playback_2" } capture_ports { 0 "system:capture_1" 1 "system:capture_2" } }
This will make the JACK plugin the default ALSA device. Most applications will simply use the default, so this is usually all you have to do. Some applications may have a way to select the sound input/output within the application, in that case you should either use 'default' or manually select 'jack_system'.
You can now use SimpleScreenRecorder with the JACK backend. SimpleScreenRecorder can automatically make connections for common use cases (recording the microphone and/or the speakers), but if you need more fine-tuned control, you can manually manage connections with QJackCtl by clicking the 'connect' button (not to be confused with the 'patchbay' button, which is used to automatically apply predefined connections).
You can also combine SimpleScreenRecorder with various other JACK applications to apply audio effects in real-time.
When you're done with JACK, you should first close all applications that use the sound system, then delete the .asoundrc file in your home folder (or just rename it so you can re-use it later), and then stop JACK through QJackCtl.
Comments
Varaz |
Comment #1: Wed, 16 Oct 2013, 13:21 (GMT+1, DST) Hi, |
Maarten BaertAdministrator |
Comment #2: Fri, 18 Oct 2013, 18:50 (GMT+1, DST) Quote: Varaz
Hi, That's not possible as far as I know. The next version should have JACK support for those who don't want to use PulseAudio (like me ;)). You can also set up an ALSA bridge for JACK, I've heard that this works with SSR (I never tried it myself though). |
Feles |
Comment #3: Sat, 19 Oct 2013, 22:00 (GMT+1, DST) Hey thanks for this info, "The Hard Way" for recording both game and mic audio works perfectly for me, for most games. However there are a few games where I can't change the output in pavucontrol to be Null Output, or anything else actually, I just can't change it. The dropdown shows up and the two Null Outputs are there, but selecting them does nothing. There's not much info online about this, but from the one or two things I've seen about it, it might be an OpenAL issue. I haven't figured out how to fix it properly, but I came up with a workaround. If you disable all outputs, the game will be forced to output to the second Null Output, and you can record as normal (although the game sound doesn't seems to run through the speakers anymore) Just curious, do you have any idea on how to properly fix this? I'd be very grateful for any info. |
Maarten BaertAdministrator |
Comment #4: Sun, 20 Oct 2013, 0:24 (GMT+1, DST) Quote: Feles
Hey thanks for this info, "The Hard Way" for recording both game and mic audio works perfectly for me, for most games. However there are a few games where I can't change the output in pavucontrol to be Null Output, or anything else actually, I just can't change it. The dropdown shows up and the two Null Outputs are there, but selecting them does nothing. There's not much info online about this, but from the one or two things I've seen about it, it might be an OpenAL issue. I haven't figured out how to fix it properly, but I came up with a workaround. If you disable all outputs, the game will be forced to output to the second Null Output, and you can record as normal (although the game sound doesn't seems to run through the speakers anymore) Just curious, do you have any idea on how to properly fix this? I'd be very grateful for any info. If it's an OpenAL issue, you could try to change /etc/openal/alsoft.conf so it uses ALSA instead of PulseAudio. To do this, find the line starting with drivers= and replace it with drivers=alsa. There is no way to change the PulseAudio source from ALSA, so the game shouldn't be able to interfere anymore. Last modified: Sun, 20 Oct 2013, 0:25 (GMT+1, DST) |
Joozey |
Comment #5: Thu, 24 Oct 2013, 21:55 (GMT+1, DST) Quote: Maarten Baert
Quote: Feles
Hey thanks for this info, "The Hard Way" for recording both game and mic audio works perfectly for me, for most games. However there are a few games where I can't change the output in pavucontrol to be Null Output, or anything else actually, I just can't change it. The dropdown shows up and the two Null Outputs are there, but selecting them does nothing. There's not much info online about this, but from the one or two things I've seen about it, it might be an OpenAL issue. I haven't figured out how to fix it properly, but I came up with a workaround. If you disable all outputs, the game will be forced to output to the second Null Output, and you can record as normal (although the game sound doesn't seems to run through the speakers anymore) Just curious, do you have any idea on how to properly fix this? I'd be very grateful for any info. If it's an OpenAL issue, you could try to change /etc/openal/alsoft.conf so it uses ALSA instead of PulseAudio. To do this, find the line starting with drivers= and replace it with drivers=alsa. There is no way to change the PulseAudio source from ALSA, so the game shouldn't be able to interfere anymore. That's awesome, this works for me on Ubuntu 12.04. In my case Java, now loads through ALSA, which I can change to the game sink. I found you can name your sinks too for display in pulseaudio through: sink-properties=device.description="Null_Sink_Duplex_Out", which makes it easier to determine which sink you assign from the dropdown menu. Thanks a lot for this tutorial! It makes more sense now, and works like a charm. |
Bazukas |
Comment #6: Mon, 6 Jan 2014, 4:18 (GMT+1, DST) Hello! Does JACK audio source work now? If so, could you, please, provide some instructions on how to record both Thank you. |
Maarten BaertAdministrator |
Comment #7: Mon, 6 Jan 2014, 19:09 (GMT+1, DST) Quote: Bazukas
Hello! Does JACK audio source work now? If so, could you, please, provide some instructions on how to record both Thank you. JACK support is ready but not released yet. You have to wait until the next version (or compile from source). |
Ubuntuaddicted |
Comment #8: Thu, 9 Jan 2014, 3:22 (GMT+1, DST) Quote: Maarten Baert
Quote: Bazukas
Hello! Does JACK audio source work now? If so, could you, please, provide some instructions on how to record both Thank you. JACK support is ready but not released yet. You have to wait until the next version (or compile from source). are there any other new features that would make me want to compile the latest code versus just running the prepackaged deb you're providing in your PPA? Also, i just noticed your instructions for "the hard way" are actually different than mine (more complex also) and I am able to record the game audio as well as my mic input just fine. You only need 1 null output and 2 loopbacks, that's it. I don't know why you say to create all those other null outputs and loopbacks. Here's the script I run just prior to recording or streaming. #!/bin/bash pactl load-module module-null-sink sink_name=virtual1 sink_properties=device.description="mic+game" pactl load-module module-loopback sink=virtual1 pactl load-module module-loopback sink=virtual1 Then I go into pavucontrol recording tab and 1 loopback to mic+game is "monitor of Built-In analog audio stereo" (the game) and the other loopback to mic+game is my "081a analog mono" (which is the usb webcam microphone) and then within ssr, i choose mic+game as what it should record. I can provide pictures if anyone needs them. Last modified: Thu, 9 Jan 2014, 3:33 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #9: Fri, 10 Jan 2014, 0:42 (GMT+1, DST) Quote: Ubuntuaddicted
are there any other new features that would make me want to compile the latest code versus just running the prepackaged deb you're providing in your PPA? Probably not. Quote: Ubuntuaddicted
Also, i just noticed your instructions for "the hard way" are actually different than mine (more complex also) and I am able to record the game audio as well as my mic input just fine. You only need 1 null output and 2 loopbacks, that's it. I don't know why you say to create all those other null outputs and loopbacks. Here's the script I run just prior to recording or streaming. #!/bin/bash pactl load-module module-null-sink sink_name=virtual1 sink_properties=device.description="mic+game" pactl load-module module-loopback sink=virtual1 pactl load-module module-loopback sink=virtual1 Then I go into pavucontrol recording tab and 1 loopback to mic+game is "monitor of Built-In analog audio stereo" (the game) and the other loopback to mic+game is my "081a analog mono" (which is the usb webcam microphone) and then within ssr, i choose mic+game as what it should record. I can provide pictures if anyone needs them. I copied the instructions from someone else. The difference is that you will record everything that is played back, whereas the instructions on this page will record only a single game. For most users it probably doesn't make a difference, but I don't feel like updating those images :P. Last modified: Fri, 10 Jan 2014, 0:42 (GMT+1, DST) |
Xage |
Comment #10: Wed, 12 Feb 2014, 7:12 (GMT+1, DST) Good, don't change it since I prefer audio of only a single game and I use this page for reference. Thanks. =D Quote: Maarten Baert
I copied the instructions from someone else. The difference is that you will record everything that is played back, whereas the instructions on this page will record only a single game. For most users it probably doesn't make a difference, but I don't feel like updating those images :P. |
Ubuntuaddicted |
Comment #11: Wed, 12 Feb 2014, 15:49 (GMT+1, DST) Quote: Xage
Good, don't change it since I prefer audio of only a single game and I use this page for reference. Thanks. =D Quote: Maarten Baert
I copied the instructions from someone else. The difference is that you will record everything that is played back, whereas the instructions on this page will record only a single game. For most users it probably doesn't make a difference, but I don't feel like updating those images :P. have you ever played 2 games at the same time? lol |
Cjcwj12 |
Comment #12: Thu, 20 Feb 2014, 8:30 (GMT+1, DST) Hello [PageRecord::StartPage] Starting page ... Why can't it connect to JACK? I am on Elementary OS |
Maarten BaertAdministrator |
Comment #13: Thu, 20 Feb 2014, 11:45 (GMT+1, DST) Quote: Cjcwj12
Hello [PageRecord::StartPage] Starting page ... Why can't it connect to JACK? I am on Elementary OS JACK is not like PulseAudio, you need to set it up manually. You can start the JACK server with the QJackCtl GUI. You also need to set up an ALSA-to-JACK bridge (you can do that with a loop device, but I prefer the JACK plugin for ALSA because it has less latency). |
Manuel |
Comment #14: Fri, 28 Feb 2014, 15:20 (GMT+1, DST) Hi First let my say that your program is super awesome! I tried a lot like glc and others and with ssr it is now possible to make game footage videos on linux and it really works and on top of that is is really simple :-D But unfortunately i cant get the recording to work with sound that does not stutter and background noise when i play the video. I use the pulseaudio method and ogg vobis as codec i tried different Bits for encoding but nothing seems to work. I hear the game sound and a low constant noise in the background and the game sound is a little stuttered but nearly not noticeable. In the console window off ssr i get: [PageRecord::StartPage] Starting page ... [GLInjectLauncher::Init] Full command: LD_PRELOAD=libssr-glinject.so SSR_GLINJECT_SHM=15597620 %command% [PageRecord::StartPage] Started page. [PageRecord::StartOutput] Starting output ... [Muxer::Init] Using format matroska (Matroska). [BaseEncoder::CreateCodec] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10). [BaseEncoder::CreateCodec] Using codec libvorbis (libvorbis). [BaseEncoder::EncoderThread] Encoder thread started. [DetectCPUFeatures] CPU features: mmx sse sse2 sse3 [DetectCPUFeatures] CPU features: mmx sse sse2 sse3 [PageRecord::StartOutput] Started output. [PageRecord::StartInput] Starting input ... [BaseEncoder::EncoderThread] Encoder thread started. [GLInjectInput::InputThread] Input thread started. [PageRecord::StartInput] Started input. [Synchronizer::SynchronizerThread] Synchronizer thread started. [Muxer::MuxerThread] Muxer thread started. [PulseAudioInput::InputThread] Input thread started. [FastResampler::Resample] Resample ratio is 1.0000 (was 0.0000). [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. etc. Is the cause of the problem the too many audio samples ? If so, how can i reduce them ? Thanks |
Ubuntuaddicted |
Comment #15: Fri, 28 Feb 2014, 21:29 (GMT+1, DST) Quote: Manuel
Hi First let my say that your program is super awesome! I tried a lot like glc and others and with ssr it is now possible to make game footage videos on linux and it really works and on top of that is is really simple :-D But unfortunately i cant get the recording to work with sound that does not stutter and background noise when i play the video. I use the pulseaudio method and ogg vobis as codec i tried different Bits for encoding but nothing seems to work. I hear the game sound and a low constant noise in the background and the game sound is a little stuttered but nearly not noticeable. In the console window off ssr i get: [PageRecord::StartPage] Starting page ... [GLInjectLauncher::Init] Full command: LD_PRELOAD=libssr-glinject.so SSR_GLINJECT_SHM=15597620 %command% [PageRecord::StartPage] Started page. [PageRecord::StartOutput] Starting output ... [Muxer::Init] Using format matroska (Matroska). [BaseEncoder::CreateCodec] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10). [BaseEncoder::CreateCodec] Using codec libvorbis (libvorbis). [BaseEncoder::EncoderThread] Encoder thread started. [DetectCPUFeatures] CPU features: mmx sse sse2 sse3 [DetectCPUFeatures] CPU features: mmx sse sse2 sse3 [PageRecord::StartOutput] Started output. [PageRecord::StartInput] Starting input ... [BaseEncoder::EncoderThread] Encoder thread started. [GLInjectInput::InputThread] Input thread started. [PageRecord::StartInput] Started input. [Synchronizer::SynchronizerThread] Synchronizer thread started. [Muxer::MuxerThread] Muxer thread started. [PulseAudioInput::InputThread] Input thread started. [FastResampler::Resample] Resample ratio is 1.0000 (was 0.0000). [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video. etc. Is the cause of the problem the too many audio samples ? If so, how can i reduce them ? Thanks what linux distro are you using? are you using pulseaudio? have you checked his troubleshooting section for the daemon.conf file and sample rate? |
Manuel |
Comment #16: Fri, 28 Feb 2014, 21:52 (GMT+1, DST) Hi Im using Gentoo. I found a fix. I applied tsched= 0 to the default.pa from pulseaudio and the 441khz fix. This works now :-D Very pleased! Thanks |
Maarten BaertAdministrator |
Comment #17: Fri, 28 Feb 2014, 22:13 (GMT+1, DST) Quote: Manuel
I use the pulseaudio method and ogg vobis as codec i tried different Bits for encoding but nothing seems to work. I hear the game sound and a low constant noise in the background and the game sound is a little stuttered but nearly not noticeable. [...] Is the cause of the problem the too many audio samples ? If so, how can i reduce them ? The background noise is probably just your microphone (you can verify this by recording some audio in a program like Audacity). The best solution is to use a USB microphone, those tend to have far less noise (because the analog-to-digital conversion happens in microphone itself). The 'too many audio samples' warning is caused by bugs in PulseAudio - it sometimes produces sounds (usually short periods of silence) that aren't actually there. If you want better quality audio, I recommend JACK instead. It is harder to set up, but less buggy. |
Dubslow |
Comment #18: Sun, 2 Mar 2014, 2:54 (GMT+1, DST) I've dropped by to share a discovery concerning the merged audio-game sounds process with PulseAudio. The main issue that I've had with it is that even if the null outputs are properly configured, when I run a program (game or otherwise) that outputs sound, it defaults to the usual sink, not the one we need it on -- and this can be a problem if a game does not support Alt-Tab-ing. Since I can't set the game to the null sink without the game running, but I can't change anything while it is running, I can't record its audio. The solution is to set the proper null sink as the *default* sink. This can be accomplished with the command pacmd set-default-sink game_out immediately following the four commands given above. This comes with a caveat however; in order for this command to take effect, the file /etc/pulse/default.pa must have the following line modified: load-module module-stream-restore should become load-module module-stream-restore restore_device=false Once Pulse has been restarted to reload the config file, the set-default command will work and I can record game sounds without needing to change anything while the game is running. (Note, of course, that *all* sounds, such as browser or music player sounds are also captured by the null sink as well with this default.) Last modified: Sun, 2 Mar 2014, 2:54 (GMT+1, DST) |
Ubuntuaddicted |
Comment #19: Tue, 4 Mar 2014, 17:50 (GMT+1, DST) Quote: Dubslow
I've dropped by to share a discovery concerning the merged audio-game sounds process with PulseAudio. The main issue that I've had with it is that even if the null outputs are properly configured, when I run a program (game or otherwise) that outputs sound, it defaults to the usual sink, not the one we need it on -- and this can be a problem if a game does not support Alt-Tab-ing. Since I can't set the game to the null sink without the game running, but I can't change anything while it is running, I can't record its audio. The solution is to set the proper null sink as the *default* sink. This can be accomplished with the command pacmd set-default-sink game_out immediately following the four commands given above. This comes with a caveat however; in order for this command to take effect, the file /etc/pulse/default.pa must have the following line modified: load-module module-stream-restore should become load-module module-stream-restore restore_device=false Once Pulse has been restarted to reload the config file, the set-default command will work and I can record game sounds without needing to change anything while the game is running. (Note, of course, that *all* sounds, such as browser or music player sounds are also captured by the null sink as well with this default.) hmmm, i don't use the instructions he has written here. i only create 2 loopbacks and 1 nullsink. 1 loopback is monitor of internal audio and the other loopback is my mic, i point both those loopbacks to my null sink and tell ssr to record the null sink. So I have never came across the issue you were having, my game will always launch and it's audio will always play on the internal audio. So i never have to mess with all that stuff you have to . |
Andabata |
Comment #20: Wed, 12 Mar 2014, 14:47 (GMT+1, DST) Hi Maarten, thanks for your efforts. Last modified: Wed, 12 Mar 2014, 14:53 (GMT+1, DST) |
Mrknightofthecheese |
Comment #21: Wed, 16 Apr 2014, 18:12 (GMT+1, DST) Thank you SO MUCH for putting JACK on SimpleScreenRecorder! |
Mrknightofthecheese |
Comment #22: Sun, 20 Apr 2014, 19:35 (GMT+1, DST) Anyway,how to record skype? |
Maarten BaertAdministrator |
Comment #23: Mon, 21 Apr 2014, 17:42 (GMT+1, DST) Quote: Mrknightofthecheese
Anyway,how to record skype? Just like any other application? If you want to record Skype with JACK, you just have to make sure that Skype is not running when you start JACK, otherwise Skype won't know that it should use JACK. |
Ubuntuaddicted |
Comment #24: Mon, 21 Apr 2014, 19:16 (GMT+1, DST) Quote: Mrknightofthecheese
Anyway,how to record skype? is that the only thing you want to record or do you also want to record your own voice as well? |
Mrknightofthecheese |
Comment #25: Wed, 23 Apr 2014, 17:42 (GMT+1, DST) Quote: Maarten Baert
Quote: Mrknightofthecheese
Anyway,how to record skype? Just like any other application? If you want to record Skype with JACK, you just have to make sure that Skype is not running when you start JACK, otherwise Skype won't know that it should use JACK. Nope,this doesn't works.I started JACK with QjackCtl and then I started skype,but the icon of jack was red and I did not hear anything. Last modified: Wed, 23 Apr 2014, 18:51 (GMT+1, DST) |
Mrknightofthecheese |
Comment #26: Wed, 23 Apr 2014, 18:33 (GMT+1, DST) Quote: Ubuntuaddicted
Quote: Mrknightofthecheese
Anyway,how to record skype? is that the only thing you want to record or do you also want to record your own voice as well? I want to record skype and my voice. |
Maarten BaertAdministrator |
Comment #27: Wed, 23 Apr 2014, 20:57 (GMT+1, DST) Quote: Mrknightofthecheese
Nope,this doesn't works.I started JACK with QjackCtl and then I started skype,but the icon of jack was red and I did not hear anything. If the icon is red, it means you didn't start JACK properly. First try to get JACK working with an application that actually has JACK support (like Audacity) before you try to use it with Skype. By the way, make sure that you have installed the 32-bit JACK library since Skype is 32-bit. |
Mrknightofthecheese |
Comment #28: Fri, 13 Jun 2014, 20:55 (GMT+1, DST) Quote: Maarten Baert
Quote: Mrknightofthecheese
Nope,this doesn't works.I started JACK with QjackCtl and then I started skype,but the icon of jack was red and I did not hear anything. If the icon is red, it means you didn't start JACK properly. First try to get JACK working with an application that actually has JACK support (like Audacity) before you try to use it with Skype. By the way, make sure that you have installed the 32-bit JACK library since Skype is 32-bit. When QjackCtl is running,I can't hear anything from any program! |
Maarten BaertAdministrator |
Comment #29: Fri, 13 Jun 2014, 21:03 (GMT+1, DST) Quote: Mrknightofthecheese
When QjackCtl is running,I can't hear anything from any program! You should set up the ALSA-to-JACK bridge as I described. You also have to uninstall PulseAudio to make this work. |
Mrknightofthecheese |
Comment #30: Mon, 23 Jun 2014, 17:23 (GMT+1, DST) Quote: Maarten Baert
Quote: Mrknightofthecheese
When QjackCtl is running,I can't hear anything from any program! You should set up the ALSA-to-JACK bridge as I described. You also have to uninstall PulseAudio to make this work. THANK YOU! Last modified: Mon, 23 Jun 2014, 17:21 (GMT+1, DST) |
Cjcwj12 |
Comment #31: Thu, 3 Jul 2014, 10:38 (GMT+1, DST) When I make the null output loops, then go to make the java sound go to the 2nd null output, I click it but it stays on what it already was on. Please help. |
Maarten BaertAdministrator |
Comment #32: Fri, 4 Jul 2014, 18:35 (GMT+1, DST) Quote: Cjcwj12
When I make the null output loops, then go to make the java sound go to the 2nd null output, I click it but it stays on what it already was on. Please help. The PulseAudio method is known to be buggy - I can't help you with PulseAudio bugs. That's why I recommended JACK instead. |
Kovacsa |
Comment #33: Mon, 4 Aug 2014, 22:24 (GMT+1, DST) Last modified: Mon, 4 Aug 2014, 23:08 (GMT+1, DST) |
Kovacsa |
Comment #34: Mon, 4 Aug 2014, 22:32 (GMT+1, DST) Quote: Cjcwj12
When I make the null output loops, then go to make the java sound go to the 2nd null output, I click it but it stays on what it already was on. Please help. Add the line: Quote
allow-moves = true to the bottom of the ~/.alsoftrc file |
Kovacsa |
Comment #35: Tue, 5 Aug 2014, 11:54 (GMT+1, DST) My .asoundrc is not working. Still can't hear anything Last modified: Tue, 5 Aug 2014, 11:56 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #36: Tue, 5 Aug 2014, 13:34 (GMT+1, DST) Quote: Kovacsa
My .asoundrc is not working. Still can't hear anything I need more information than that ... |
Mrknightofthecheese |
Comment #37: Fri, 15 Aug 2014, 20:26 (GMT+1, DST) I've upgraded the skype version to 1.3 and now I have the same problem. Last modified: Fri, 15 Aug 2014, 20:36 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #38: Sun, 17 Aug 2014, 14:41 (GMT+1, DST) Quote: Mrknightofthecheese
I've upgraded the skype version to 1.3 and now I have the same problem. Which problem? The latest Skype has dropped support for ALSA and requires PulseAudio, which causes a lot of issues that I can't fix. |
Mrknightofthecheese |
Comment #39: Sun, 17 Aug 2014, 19:46 (GMT+1, DST) Quote: Maarten Baert
Which problem? The latest Skype has dropped support for ALSA and requires PulseAudio, which causes a lot of issues that I can't fix. I can't hear anything :( |
Maarten BaertAdministrator |
Comment #40: Mon, 18 Aug 2014, 16:01 (GMT+1, DST) Quote: Mrknightofthecheese
Quote: Maarten Baert
Which problem? The latest Skype has dropped support for ALSA and requires PulseAudio, which causes a lot of issues that I can't fix. I can't hear anything :( As I said, the latest Skype requires PulseAudio. This creates a LOT of problems. I found a workaround that's somewhat functional but it is extremely convoluted. It involves running PulseAudio and JACK at the same time, loading the PulseAudio JACK sink module, and running the 'alsaloop' program (which uses ALSA but you can use the ALSA-to-PulseAudio plugin to make this work) on your microphone. At the moment, all I can say is don't update Skype. Because once you do, you won't be able to (easily) use it with JACK anymore. |
Mrknightofthecheese |
Comment #41: Wed, 20 Aug 2014, 20:38 (GMT+1, DST) Quote: Maarten Baert
As I said, the latest Skype requires PulseAudio. This creates a LOT of problems. I found a workaround that's somewhat functional but it is extremely convoluted. It involves running PulseAudio and JACK at the same time, loading the PulseAudio JACK sink module, and running the 'alsaloop' program (which uses ALSA but you can use the ALSA-to-PulseAudio plugin to make this work) on your microphone. At the moment, all I can say is don't update Skype. Because once you do, you won't be able to (easily) use it with JACK anymore. wow |
Maarten BaertAdministrator |
Comment #42: Thu, 21 Aug 2014, 20:44 (GMT+1, DST) Quote: Mrknightofthecheese
wow Okay, but don't expect me to debug this :P.
To stop, close all programs you started in reverse order (first Skype, then SSR, then the python script, ...). |
Thekiwi5000 |
Comment #43: Tue, 9 Sep 2014, 20:06 (GMT+1, DST) Hey When i record vlc playing some mp3s, both mic and vlc audio are heard and captured. |
Maarten BaertAdministrator |
Comment #44: Tue, 9 Sep 2014, 20:27 (GMT+1, DST) Quote: Thekiwi5000
Hey When i record vlc playing some mp3s, both mic and vlc audio are heard and captured. Are you sure that you are recording the 'Monitor of <speakers/headphones>' in SSR? |
Kovacsa |
Comment #45: Sat, 13 Sep 2014, 16:16 (GMT+1, DST) Quote: Maarten Baert
Quote: Kovacsa
My .asoundrc is not working. Still can't hear anything I need more information than that ... I have done everything what you wrote, but when JACK is running, I can't hear anything |
Maarten BaertAdministrator |
Comment #46: Mon, 15 Sep 2014, 19:24 (GMT+1, DST) Quote: Kovacsa
I have done everything what you wrote, but when JACK is running, I can't hear anything This means the ALSA bridge is not working properly. Did you uninstall PulseAudio? |
Kovacsa |
Comment #47: Fri, 19 Sep 2014, 16:09 (GMT+1, DST) Quote: Maarten Baert
Quote: Kovacsa
I have done everything what you wrote, but when JACK is running, I can't hear anything This means the ALSA bridge is not working properly. Did you uninstall PulseAudio? Yes, completely. Last modified: Fri, 19 Sep 2014, 16:09 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #48: Sat, 20 Sep 2014, 18:15 (GMT+1, DST) Quote: Kovacsa
Yes, completely. Try testing JACK by running a JACK-compatible program like Audacity and playing some sound (make sure you set the audio backend to JACK, not ALSA). If this works, but normal ALSA applications don't work, the problem is the ALSA bridge. If Audacity doesn't work either, there's something wrong with your JACK setup (e.g. you might be using the wrong sound card). |
Ubuntuaddicted |
Comment #49: Thu, 16 Oct 2014, 5:58 (GMT+1, DST) i've got JACK running alongside pulseaudio using the pulseaudio jack dbus thing BUT I couldn't get JACK to work with the config you have here for ~/.asoundrc, I had to use Last modified: Thu, 16 Oct 2014, 6:38 (GMT+1, DST) |
Kovacsa |
Comment #50: Sun, 26 Oct 2014, 10:30 (GMT+1, DST) Quote: Maarten Baert
Quote: Kovacsa
Yes, completely. Try testing JACK by running a JACK-compatible program like Audacity and playing some sound (make sure you set the audio backend to JACK, not ALSA). If this works, but normal ALSA applications don't work, the problem is the ALSA bridge. If Audacity doesn't work either, there's something wrong with your JACK setup (e.g. you might be using the wrong sound card). Audacity is working with JACK, but I don't know what is the problem with the ALSA bridge |
Kovacsa |
Comment #51: Wed, 21 Jan 2015, 19:05 (GMT+1, DST) This tutorial worked for me: Last modified: Wed, 21 Jan 2015, 19:06 (GMT+1, DST) |
Tom_b |
Comment #52: Mon, 2 Feb 2015, 13:26 (GMT+1, DST) Hi there. Is it possible to record Wine audio using Pulse as a backend? It doesn't seem to work for me, either I get no Wine game audio if I start recording first, or SSR fails to record if I run the game first. It creates a zero byte file in the latter case. I have tried using ALSA but I have a ton of white noise over the top of the recording. I have played around in alsamixer but I can't find a way to get rid of it. I'm using Linux Mint 16, and PlayOnLinux with the latest version of Wine. I don't have a mic, I'm only interested in recording the game audio. Cheers. |
Maarten BaertAdministrator |
Comment #53: Wed, 4 Feb 2015, 22:50 (GMT+1, DST) Quote: Tom_b
Hi there. Is it possible to record Wine audio using Pulse as a backend? It doesn't seem to work for me, either I get no Wine game audio if I start recording first, or SSR fails to record if I run the game first. It creates a zero byte file in the latter case. Wine sometimes bypasses PulseAudio and uses ALSA directly. This breaks PulseAudio. I think you can fix this in the wine configuration, but I don't remember exactly how it is done. Quote
I have tried using ALSA but I have a ton of white noise over the top of the recording. I have played around in alsamixer but I can't find a way to get rid of it. ALSA does not have monitors, it can't record the speakers. You're recording the microphone jack and you're hearing capacitive feedthrough from your headphone jack, which is probably right next to it. You need to physically connect your headphone jack to your microphone jack (and completely disable any 'mic boost') to make this work. |
Rkaid |
Comment #54: Fri, 6 Feb 2015, 10:22 (GMT+1, DST) Quote: Ubuntuaddicted
#!/bin/bash pactl load-module module-null-sink sink_name=virtual1 sink_properties=device.description="mic+game" pactl load-module module-loopback sink=virtual1 pactl load-module module-loopback sink=virtual1 Then I go into pavucontrol recording tab and 1 loopback to mic+game is "monitor of Built-In analog audio stereo" (the game) and the other loopback to mic+game is my "081a analog mono" (which is the usb webcam microphone) and then within ssr, i choose mic+game as what it should record. I can provide pictures if anyone needs them Hello and thanks for this great program! I'm using the solution quoted above to record game audio + microphone, + loop game audio to headset. Headset (with mic) is connected through a usb keyboard which also has an audio interface. Anyway, this works great, except for some seemingly random periods where the audio becomes very stuttering. It usually goes back to normal after ~10 seconds or less. But it's annoying. On one occasion it lasted quite a while and even made my voice sound like I was breathing helium (which I was not)! As if the speed/pitch was increased. The speed up happened fairly gradually, and everything returned to normal after a couple of minutes or so. Do you know what causes this? Is it a pulseaudio bug, or something else? I could try the JACK solution, if you think that might help, I just have a bit of a hard time wrapping my head around JACK (I can probably figure it out though). I can also provide a sound sample of the problem if needed. My computer is running Arch Linux, CPU is AMD Phenom II X4 965. 12 GB RAM. I have an nvidia graphics card and discovered just now that that might be a factor. I didn't record many videos before I got that graphics card, but a quick look at those videos show no sign of the stuttering problem, whereas it's present in all videos recorded after I switched to the nvidia card (and official nvidia drivers)... I say yes when SSR prompts me to turn of the "flipping" thingy. Thanks for any help! Other notes of interest: In pulse/daemon.conf I have: default-sample-rate = 44100 alternate-sample-rate = 44100 flat-volumes=no exit-idle-time=0 high-priority=yes In pulse/default.pa I have tried with and without the "tsched=0" trick, no change as far as I can tell. |
Maarten BaertAdministrator |
Comment #55: Sat, 7 Feb 2015, 22:09 (GMT+1, DST) Quote
Anyway, this works great, except for some seemingly random periods where the audio becomes very stuttering. It usually goes back to normal after ~10 seconds or less. But it's annoying. On one occasion it lasted quite a while and even made my voice sound like I was breathing helium (which I was not)! As if the speed/pitch was increased. The speed up happened fairly gradually, and everything returned to normal after a couple of minutes or so. Do you know what causes this? Is it a pulseaudio bug, or something else? I could try the JACK solution, if you think that might help, I just have a bit of a hard time wrapping my head around JACK (I can probably figure it out though). I can also provide a sound sample of the problem if needed. Definitely a PulseAudio bug. I've seen this a lot. JACK doesn't have these issues, that's why I recommend it. I doubt your Nvidia card is related to this problem. I've had issues with PulseAudio with an AMD card as well. Besides, I really don't see how your graphics card could cause audio problems in SSR. |
Ucenna |
Comment #56: Sun, 8 Feb 2015, 6:49 (GMT+1, DST) Firstly, thanks for such a great program! It's AWESOME! I have been having one issue recently with JACK, I was hoping you might be able to help. I've been trying to record a gameboy game using VBA-M for what ever recent about 50% of the time it xruns, and then if I pause or close VBA-M the audio continues to play a "frozen" note... However, if I use VBA I don't have the problem (however I can't seem to get VBA's video settings to work quite right, hence I'm using VBA-M). |
Maarten BaertAdministrator |
Comment #57: Sun, 8 Feb 2015, 16:15 (GMT+1, DST) Quote: Ucenna
Firstly, thanks for such a great program! It's AWESOME! I have been having one issue recently with JACK, I was hoping you might be able to help. I've been trying to record a gameboy game using VBA-M for what ever recent about 50% of the time it xruns, and then if I pause or close VBA-M the audio continues to play a "frozen" note... However, if I use VBA I don't have the problem (however I can't seem to get VBA's video settings to work quite right, hence I'm using VBA-M). If you are getting occasional xruns, you can usually fix them by increasing the period size in the JACK settings. This won't fix actual bugs like repeating/frozen sound though, those are probably compatibility issues between the ALSA-to-JACK bridge and the game itself. The bridge isn't perfect, and unfortunately there is not much I can do about that. |
Ucenna |
Comment #58: Mon, 9 Feb 2015, 18:02 (GMT+1, DST) Yeah, I'd tried changing the period size and ammount. Must be compatibility issues, guess I'll try different emulators and what not. Thanks for the help! |
Shaneroach |
Comment #59: Sat, 14 Feb 2015, 6:35 (GMT+1, DST) I followed Ubuntuaddicted's little instructions and got audio from mic and game, but it had this sort of strange, actually slightly cool sounding hollow effect on my mic. If I were actually WANTING that effect, I could use it for something... I really like recording on audacity and cleaning up the noise, but I guess no way to get both the good sound of using audacity and the convenience of having the audio and video synced up automatically? Any clue WHY I got the hollow sound? I noticed I could actually hear the sound live when I unloaded the null sink while the loopback was still active. But while recording I heard only the game from my headset. P.S. as it turns out it sounds a good bit like your original video of Portal. How did you make it stop doing that for later vids? Second question... I am confused by the entire concept of JACK. I think it is necessary if I want a nice mic later too though, as I notice the Focusrite usb interface for example needs JACK. http://dragly.org/2014/01/12/focusrite-scarlett-2i2-flawlessly-working-on-ubuntu-with-jack/ I don't see anything in your instructions too terribly intimidating, but I am confused as to why I would uninstall Pulse and then reinstall it afterwards. Are there things JACK can't handle that I need Pulse for later? Or do you just mean to suggest to replace Pulse with Jack? I use Debian Sid, by the way, and just always keep a rescue partition in case an update screws me up. Dunno if you have any particular issues you know of with these instructions when using Debian, but thought I might as well toss it out there. It got my NVidia 980 working, so I'm happy. Last modified: Sat, 14 Feb 2015, 7:00 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #60: Sat, 14 Feb 2015, 17:26 (GMT+1, DST) Quote: Shaneroach
I followed Ubuntuaddicted's little instructions and got audio from mic and game, but it had this sort of strange, actually slightly cool sounding hollow effect on my mic. If I were actually WANTING that effect, I could use it for something... I really like recording on audacity and cleaning up the noise, but I guess no way to get both the good sound of using audacity and the convenience of having the audio and video synced up automatically? Any clue WHY I got the hollow sound? I noticed I could actually hear the sound live when I unloaded the null sink while the loopback was still active. But while recording I heard only the game from my headset. SSR doesn't modify the sound in any way, I don't see how it could affect the sound of your microphone. However, it is possible that you were accidentally recording the microphone twice but with a small delay (e.g. you were recording the microphone and your speakers, but also redirecting your microphone to your speakers, so the microphone was recorded twice). This would cause an echo-like effect. You can get similar results in Audacity with the Echo effect (with a small delay, e.g. 0.04 seconds) or the Reverb effect. Quote: Shaneroach
P.S. as it turns out it sounds a good bit like your original video of Portal. How did you make it stop doing that for later vids? That video was recorded with a rather poor microphone (the integrated microphone of my old laptop). I had to remove a lot of noise in Audacity which ended up creating an effect like this. You don't have these issues with a decent microphone. Quote: Shaneroach
Second question... I am confused by the entire concept of JACK. I think it is necessary if I want a nice mic later too though, as I notice the Focusrite usb interface for example needs JACK. You really shouldn't need an expensive microphone to get decent sound, basically any decent USB microphone will give you much better results than the integrated microphone that I was using. Standard USB microphones work fine with ALSA and PulseAudio as well as JACK. Quote: Shaneroach
I don't see anything in your instructions too terribly intimidating, but I am confused as to why I would uninstall Pulse and then reinstall it afterwards. Are there things JACK can't handle that I need Pulse for later? Or do you just mean to suggest to replace Pulse with Jack? PulseAudio is buggy, you can't rely on it, especially for longer recordings. JACK is more reliable, but PulseAudio interferes with the ALSA-to-JACK bridge, so you have to uninstall it. There are ways to make PulseAudio and JACK work together, but it's hard (and usually adds more latency as well). Quote: Shaneroach
I use Debian Sid, by the way, and just always keep a rescue partition in case an update screws me up. Dunno if you have any particular issues you know of with these instructions when using Debian, but thought I might as well toss it out there. It got my NVidia 980 working, so I'm happy. I haven't tried JACK on Debian but I assume it's going to be similar to Ubuntu, so you shouldn't get any serious issues. |
Shaneroach |
Comment #61: Mon, 16 Feb 2015, 6:52 (GMT+1, DST) You were right in that I had the volume control settings wrong. Last question - cleaning the hiss out of the audio? Audacity plucks the audio out of the file but does not seem to have a handy way of sticking it back in after cleanup. Over the last 18 hours or so I have experimented with cleaning the audio and putting it back in with either OpenShot or Blender. With both, the audio slowly goes out of sync. Edited to express my complete bafflement as a second attempt with OpenShot rendered a perfect product. Ummm... Still, any advice on making audio sync consistently might be appreciated.... :-S I no know. UPDATE: Ok, for this particular situation, as it pertains to OpenShot, one needs to re-encode a file to the same bitrate as when you took it out of the video. I take the audio out to clean up the mic hiss. No idea what the deal is with Blender's video editor, and too bad too as I kind of need to learn that whole system and I can't even make the most basic part of it work. Last modified: Wed, 18 Feb 2015, 5:23 (GMT+1, DST) |
Funkyg4mes |
Comment #62: Tue, 17 Feb 2015, 19:11 (GMT+1, DST) I don´t can switch the Java Output to the null sinc. Please Help. |
Shaneroach |
Comment #63: Fri, 20 Feb 2015, 20:36 (GMT+1, DST) Quote: Funkyg4mes
I don´t can switch the Java Output to the null sinc. Please Help. I think you may need to follow this procedure. http://ubuntuforums.org/showthread.php?t=2146552 Basically, it entails creating a settings file for something called OpenAL. Don't know why this seems to be so specific to Minecraft, but the fellow in the link above had the issue and so did I. |
Maarten BaertAdministrator |
Comment #64: Sun, 22 Feb 2015, 15:58 (GMT+1, DST) Quote: Shaneroach
You were right in that I had the volume control settings wrong. Last question - cleaning the hiss out of the audio? Audacity plucks the audio out of the file but does not seem to have a handy way of sticking it back in after cleanup. Over the last 18 hours or so I have experimented with cleaning the audio and putting it back in with either OpenShot or Blender. With both, the audio slowly goes out of sync. Edited to express my complete bafflement as a second attempt with OpenShot rendered a perfect product. Ummm... Still, any advice on making audio sync consistently might be appreciated.... :-S I no know. UPDATE: Ok, for this particular situation, as it pertains to OpenShot, one needs to re-encode a file to the same bitrate as when you took it out of the video. I take the audio out to clean up the mic hiss. No idea what the deal is with Blender's video editor, and too bad too as I kind of need to learn that whole system and I can't even make the most basic part of it work. I usually recombine video/audio with ffmpeg: ffmpeg -i original.mkv -i audio.wav -map 0:v -map 1:a -c:v copy -c:a libvorbis -b:a 128k combined.mkv This has always worked fine for me, but I see no reason why OpenShot or any other video editor wouldn't be able to do the same. |
Shaneroach |
Comment #65: Sat, 28 Feb 2015, 19:24 (GMT+1, DST) I sure hate to keep coming back on you like this, but I can't seem to figure anything out from docs online. Recently I tripped over my headphone wire and broke my front jack. The rear jack works fine. Audacity can record it. But the loopbacks I had been using to unite the commentary with the game no longer work. Voice simply does not show, despite it showing up in P.A. control as an audio input, and it is not muted. Oddly, Audacity doesn't want to record from my webcam anymore. Not sure why that happened. But mostly I am just curious how these loopbacks work and why they seem to miss the rear mic, if you have any clue. Last modified: Tue, 3 Mar 2015, 23:53 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #66: Sun, 1 Mar 2015, 16:22 (GMT+1, DST) Quote: Shaneroach
I sure hate to keep coming back on you like this, but I can't seem to figure anything out from docs online. Recently I tripped over my headphone wire and broke my front jack. The rear jack works fine. Audacity can record it. But the loopbacks I had been using to unite the commentary with the game no longer work. Voice simply does not show, despite it showing up in P.A. control as an audio input, and it is not muted. Oddly, Audacity doesn't want to record from my webcam anymore. Not sure why that happened. But mostly I am just curious how these loopbacks work and why they seem to miss the read mic, if you have any clue. You may be able to get it to work in PulseAudio if you change the settings from within alsamixer instead of the PulseAudio configuration. I suspect PulseAudio is still recording your front jack because of incorrect settings. First try to get your microphone working again in PulseAudio, then try to get the loopbacks to work. Audacity does NOT support PulseAudio, only ALSA. You shouldn't use it to test whether PulseAudio is working. Try testing the microphone with the PulseAudio backend in SSR, if you can get that to work then you should be able to do the same with loopbacks. |
Shaneroach |
Comment #67: Mon, 2 Mar 2015, 8:17 (GMT+1, DST) Ok, I guess alsamixer was not as straightforward as I thought. I had to press f5 AFTER pressing f6 to get the full list, which finally gave me the input options, and while the input said rear mic, input boost did not. Changing that to rear mic worked. Edited to add: Followed instructions for using Jack, including uninstalling pulseaudio. YouTube has sound. Neither Dying Light nor a game called Gear Up seem to however. Poking around in the Qjackctl interface did not show me any obvious solutions like some sort of channel for getting audio out of the game. Soooo... any help with that would be appreciated. Mic noise appears to be related to cheap MSI onboard sound. Hisses in Windows as well. Disappointing, but happily nothing to do with Linux. Guess I will be looking for a sound card. Last modified: Mon, 2 Mar 2015, 23:36 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #68: Tue, 3 Mar 2015, 23:00 (GMT+1, DST) Quote: Shaneroach
Edited to add: Followed instructions for using Jack, including uninstalling pulseaudio. YouTube has sound. Neither Dying Light nor a game called Gear Up seem to however. Poking around in the Qjackctl interface did not show me any obvious solutions like some sort of channel for getting audio out of the game. Sounds like a problem with the ALSA-to-JACK bridge. Are you sure that you set that part up correctly? YouTube may still be working because Flash likes to bypass the ALSA configuration in some cases, unlike most other applications. Quote: Shaneroach
Mic noise appears to be related to cheap MSI onboard sound. Hisses in Windows as well. Disappointing, but happily nothing to do with Linux. Guess I will be looking for a sound card. Your onboard sound chip is better than you think. Don't bother buying a PCI sound card, they will likely have the same issue. You need an external USB sound card to get rid of the noise, because most of the noise is electromagnetic interference generated by the PC itself. The sound card needs to be outside the case to shield it from the noise. USB microphones are also a very good (and generally cheaper) option. The analog-to-digital conversion happens in the microphone itself, so your sound card becomes irrelevant. I have a €20 USB microphone with effectively no audible noise at all. |
Shaneroach |
Comment #69: Tue, 3 Mar 2015, 23:51 (GMT+1, DST) Quote: Maarten Baert
Sounds like a problem with the ALSA-to-JACK bridge. Are you sure that you set that part up correctly? I dunno. I would have sworn I did, but out of desperation I tried it again and Dying Light has sound now, but Gear Up still doesn't. In fairness, Gear Up is something of a Beta release. Still, odd it has no sound. I am getting rid of pulse just by apt-get purge pulseaudio. Are there other things that need specific attention? Well... you may not be much for Debian so... Oh.... and YouTube STOPPED working this time...??? I just picked up one of these mic-to-usb converters which did indeed clean out the hiss. It shows up in alsamixer as a separate sound card. I dunno if that has anything to do with it or what, but it too does not like the loopback trick in Pulse. I have it on my things to do list to work on making JACK and PulseAudio work together. There are any number of (conflicting) instructions on the web on how to do it. LOL! One of them is bound to work. Was there anything I needed to install on Linux FIRST before simply adding that .asoundrc file, installing Jack, and uninstalling PulseAudio? And I mean, just to be utterly safe I have rebooted a couple of times and started Jack before doing anything else, so I don't think that is an issue. I have read more of your interaction at GitHub and would like to be able to submit perhaps more useful information for your troubleshooting. It seems you are none too fond of Pulseaudio, but ultimately it appears to be the future of Linux audio for the foreseeable future and I think it would be worth your while to make sure ssr works with it as seamlessly as possible. Please point me in the direction of information that will help me help you, so to speak. As always, really, any and all tips welcome. Last modified: Wed, 4 Mar 2015, 22:59 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #70: Thu, 5 Mar 2015, 20:57 (GMT+1, DST) The ALSA-to-JACK bridge is not perfect, and some applications do weird things that cause it to break. There's not much I can do about that I'm afraid. Quote: Shaneroach
I just picked up one of these mic-to-usb converters which did indeed clean out the hiss. It shows up in alsamixer as a separate sound card. I dunno if that has anything to do with it or what, but it too does not like the loopback trick in Pulse. USB mics are treated as separate sound cards, so the commands you need may be a bit different. JACK won't automatically open secondary sound cards, you have to use the 'alsa_in' tool to make the microphone visible there. Quote: Shaneroach
I have it on my things to do list to work on making JACK and PulseAudio work together. There are any number of (conflicting) instructions on the web on how to do it. LOL! One of them is bound to work. I've done it before. The best strategy I've found so far is:
This is pretty much the only reliable way to do it. It works because it avoids all the buggy parts: PulseAudio is only used for simple capturing and playback and nothing else, JACK is only used for mixing, there is no ALSA-to-JACK bridge, and the microphone can be recorded by SSR without going through PulseAudio. Quote: Shaneroach
I have read more of your interaction at GitHub and would like to be able to submit perhaps more useful information for your troubleshooting. It seems you are none too fond of Pulseaudio, but ultimately it appears to be the future of Linux audio for the foreseeable future and I think it would be worth your while to make sure ssr works with it as seamlessly as possible. Please point me in the direction of information that will help me help you, so to speak. SSR does work with PulseAudio as seamlessly as possible. Unfortunately PulseAudio is a buggy mess, so 'as seamlessly as possible' means 'expect intermittent problems'. I have tried to find ways to work around bugs in PulseAudio, and SSR contains quite some lines of code whose only purpose is to try to repair the mess that comes out of PulseAudio. But no amount of workarounds from my side will change the fact that PulseAudio is just broken. I can't do much until the bugs are fixed. Some have been fixed over the years, but there is still a lot to do, and the PulseAudio developers don't seem to be in a hurry to fix them (sadly there are lots of people who feel that the occasional bug is acceptable). If you want these problems to be fixed, try to get the attention of the PulseAudio developers and get them to fix it - I can't do it in SSR. |
Shaneroach |
Comment #71: Fri, 6 Mar 2015, 21:24 (GMT+1, DST) First, thanks again for your help. Second, I apologize if I spoke out of turn concerning your coding. I really did not and do not know enough to be making statements like that. I can only say I meant well. =) Finally, the solution for me was to use the little "set as fallback" button for the usb mic in pavucontrol under the input devices tab. I had fiddled with this before, but the buttons are rather indistinct to me as to whether they were on or off. I sat down and experimented with it a bit and viola. So, you know, in case another doofus like me comes along - there's the fix. lol Edit: Hmm. Using fallback is really buggy. I used it once to record Witcher II, then went to record a different game and it did not work. It then proceeded to go ahead and work when recording the whole desktop, though after a reboot, so I can't really tell if I changed a setting somewhere that broke/fixed something. I need to figure out how to just make this idiotic mic show up in playback devices so I can just aim its input at the null sink for the game. Last modified: Mon, 9 Mar 2015, 20:51 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #72: Fri, 6 Mar 2015, 21:46 (GMT+1, DST) Quote: Shaneroach
First, thanks again for your help. Second, I apologize if I spoke out of turn concerning your coding. I really did not and do not know enough to be making statements like that. I can only say I meant well. =) No problem, I know it's impossible to tell whether a bug is caused by the program itself or some library. Believe me, these kinds of bugs annoy me more than anyone else. I'm actually working on my own basic sound server as a side project. My goal is to make it support the PulseAudio protocol, so I can finally get rid of these bugs without having to mess with existing applications that currently use the PulseAudio. But it's nowhere near finished yet. |
Shaneroach |
Comment #73: Tue, 10 Mar 2015, 5:26 (GMT+1, DST) Longer term fix involves finding input sources and rerouting the output from the USB mic to the sink labelled "duplex_out" in the instructions on this page. So for me the last line reads - pactl load-module module-loopback source=alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono sink=duplex_out Basically, use pacmd list-sources to find your mic. Be sure to look for "analog-input-mic" or something very similar followed by a lot of text indicating this is the mic attached to the hardware you want to use (in my case the usb mic). You are not looking for an output. Scroll up to find the name of the device that is responsible and place it in the loopbacks as above. Last modified: Tue, 10 Mar 2015, 17:45 (GMT+1, DST) |
Bigstiffy |
Comment #74: Tue, 14 Jul 2015, 4:01 (GMT+1, DST) Took a while to get the audio working correctly, I had prior settings that enabled the audio mixing between mic and output, but had the stuttering with "too many audio samples" error. Did the 44.1khz fix, with tsched disabled as another poster mentioned doing, didn't work. Finally started from scratch, leaving the 44.1khz fix and tsched disabled followed the "pulseaudio hard way" directions to a T, didn't work at first, then figured out I had to set one of the 3 virtual steams in recording tab to my microphone and that fixed it, audio seems crisp and clean thus far. |
Bigstiffy |
Comment #75: Tue, 14 Jul 2015, 4:58 (GMT+1, DST) Well, I recorded about 30 minutes after having said it was fixed, and playing it back, the audio becomes garbled about 1 minute into the recording, the garbled sounds last for about 1 minute, then audio goes back to normal. |
Gallaecio |
Comment #76: Sat, 18 Jul 2015, 23:32 (GMT+1, DST) To get the "hard way" working, I had to change your last (fifth) line by the following two lines in a bash script: This is where I found out: http://forums.debian.net/viewtopic.php?f=16&t=110440 By the way, I found that you can actually name the created sinks as follows: PS: Awesome software! |
Nic Leo |
Comment #77: Mon, 18 Jan 2016, 21:25 (GMT+1, DST) ok , so SSR worked fine on our mint machine (NVIDA graphics card with AMD proc, brand new) then we implemented Jack server as instructed here above. in order to get video playback we also installed and configures the pulseaudio plugin (see http://www.linuxmao.org/pulseaudio+vers+jack) we got video playback Ok but nthen got stuck with no sound from java/minecraft and no sound from skype (latest linux version) we found a fix documented on the github thread here : please note : this note is a summary of github thread here : it 's been hard, took us a lot of time researching forums and al, but got there eventually ! phew !! is this site active ? we are the first post for the last 8 months it seems ! Last modified: Thu, 21 Jan 2016, 18:29 (GMT+1, DST) |
Robbie73 |
Comment #78: Fri, 19 Feb 2016, 19:04 (GMT+1, DST) Quote: Nic Leo
it 's been hard, took us a lot of time researching forums and al, but got there eventually ! phew !! is this site active ? we are the first post for the last 8 months it seems ! Yes. i would imagine people are here still :) Anyway the lad wants to upload videos and SSR is certainly good and indeed marvelous tool perfectly capable of doing a good job. (Thank you so much Maarten btw). Does that make sense? it would be a wonderful wonderful addition if it is even possible? i reckon that if anyone can, Maarten could make this work. somehow. |
Maarten BaertAdministrator |
Comment #79: Mon, 22 Feb 2016, 2:41 (GMT+1, DST) Quote: Robbie73
Anyway the lad wants to upload videos and SSR is certainly good and indeed marvelous tool perfectly capable of doing a good job. (Thank you so much Maarten btw). Does that make sense? it would be a wonderful wonderful addition if it is even possible? i reckon that if anyone can, Maarten could make this work. somehow. I wish there was an easy way to do that, but sadly Linux audio is a bit messy. We have ALSA which is reliable but doesn't support monitors. We have PulseAudio which supports monitors but is buggy when you start doing unusual things (like recording a monitor ...). We have JACK which is reliable and can do pretty much anything, but it's not user-friendly, doesn't cooperate well with the other two options, and most general-purpose applications don't have built-in support for it so they require plugins, which are tricky to use right. I've actually started writing my own sound server (basically 'ALSA with monitor support') to simplify this mess, but I haven't had time to complete it yet (it's a lot of work because I also need to emulate ALSA and PulseAudio to make it work with existing applications). Maybe some day this will be as easy as you describe :). |
Potato |
Comment #80: Tue, 8 Mar 2016, 18:46 (GMT+1, DST) when I tried the easy way my computer stopped playing audio.I tried to undo it but it still didn't play audio |
Maarten BaertAdministrator |
Comment #81: Mon, 14 Mar 2016, 0:29 (GMT+1, DST) Quote: Potato
when I tried the easy way my computer stopped playing audio.I tried to undo it but it still didn't play audio Hence the warning at the top. PulseAudio is buggy. A restart of PulseAudio (or the entire machine) will fix this. |
Kovacsa |
Comment #82: Fri, 1 Apr 2016, 22:40 (GMT+1, DST) Hi Finally I managed to set up the JACK system and uninstall pulseaudio. It is working now but is very unstable and goes crazy. I don't know how to explain, but often starts to sound the same as when I slow down the video on YouTube. Normal voice turns into some annoying stuttering robotic sound, which starts and ends randomly. I think this is some buffer error but I don't know this level of audio processing so couldn't find any help on Google. Turning the sample rate to 48000 Hz from 44100 Hz makes this less often if this helps you. Can you give advice to fix this, because it is very annoying and frustrating? |
Maarten BaertAdministrator |
Comment #83: Sat, 2 Apr 2016, 4:54 (GMT+1, DST) Quote: Kovacsa
Hi Finally I managed to set up the JACK system and uninstall pulseaudio. It is working now but is very unstable and goes crazy. I don't know how to explain, but often starts to sound the same as when I slow down the video on YouTube. Normal voice turns into some annoying stuttering robotic sound, which starts and ends randomly. I think this is some buffer error but I don't know this level of audio processing so couldn't find any help on Google. Turning the sample rate to 48000 Hz from 44100 Hz makes this less often if this helps you. Can you give advice to fix this, because it is very annoying and frustrating? Try increasing the period size (try 1024, 2048, maybe even 4096). Does this make any difference? Also, is QJackCtl showing xruns? |
Kovacsa |
Comment #84: Sat, 2 Apr 2016, 10:31 (GMT+1, DST) My normal buffer size is 1024 with 46,4 ms latency and I don't get real xruns. If I increase it, the glitch still occurs, if I decrease it, still glitching and I get lots of xruns. The sound glitch doesn't appear anywhere in qjackctl not even in verbose messages. QJackCtl shows only real xruns when buffer size is low. |
Maarten BaertAdministrator |
Comment #85: Sun, 3 Apr 2016, 16:10 (GMT+1, DST) Quote: Kovacsa
My normal buffer size is 1024 with 46,4 ms latency and I don't get real xruns. If I increase it, the glitch still occurs, if I decrease it, still glitching and I get lots of xruns. The sound glitch doesn't appear anywhere in qjackctl not even in verbose messages. QJackCtl shows only real xruns when buffer size is low. Does this happen with all applications, or only one? I've noticed that in some cases a specific application doesn't work well with JACK. |
Kovacsa |
Comment #86: Mon, 4 Apr 2016, 21:24 (GMT+1, DST) Often happens in Google Chrome (YouTube and Twitch) and TeamSpeak. But never in Minecraft (java stuff). I lowered the resolution and swappiness and this helped a little. Now it is less powerful and recovers faster. In order to stop it, the fastest way is to pause the video, wait until chrome disconnects the "alsa-jack.rjackP.xxxx.x" client in qJackCtl and resume the video. I bet this will be a simple setting I didn't notice. :) Also found more strange stuff: with the built-in ubuntu Videos application, I hear the normal audio clearly, and there is that crackling effect over it. If I pause and resume for a moment, it is gone immediately. |
Maarten BaertAdministrator |
Comment #87: Sun, 10 Apr 2016, 23:41 (GMT+1, DST) All I can say is that you should try increasing both the period size and the number of periods. But even then it is possible that some applications won't play nice with JACK. |
Charlie |
Comment #88: Sat, 16 Jul 2016, 15:02 (GMT+1, DST) Hi! timeout waiting for client SimpleScreenRecorder to handle a ports connected event cannot send port connection notification to client SimpleScreenRecorder (Resource temporarily unavailable) And the matching output from ssr (0.3.1): [JACKInput::InputThread] Connecting port alsa-jack.rjackP.24506.0:out_000 to SimpleScreenRecorder:in_1. [JACKInput::InputThread] Connecting port alsa-jack.rjackP.24506.0:out_001 to SimpleScreenRecorder:in_2. cannot read result for request type 3 from server (Connection reset by peer) cannot send event response to engine (Broken pipe) jack_client_thread: zombified - exiting from JACK Any ideas how to overcome this? Thanks, |
Wordspoken |
Comment #89: Sat, 22 Oct 2016, 13:43 (GMT+1, DST) Hi. Trying to record game myself, but I'm having trouble with sound. I'm on Lubuntu 14.04.5, followed the guide on this page to set up recording through JACK. If I set driver in jack to dummy, I get sound from applications but they record nothing, if I set driver to alsa I get no sound. So I need to change something at .asoundrc? But what? I'm clueless. |
Maarten BaertAdministrator |
Comment #90: Sun, 23 Oct 2016, 17:52 (GMT+1, DST) Quote: Wordspoken
Hi. Trying to record game myself, but I'm having trouble with sound. I'm on Lubuntu 14.04.5, followed the guide on this page to set up recording through JACK. If I set driver in jack to dummy, I get sound from applications but they record nothing, if I set driver to alsa I get no sound. So I need to change something at .asoundrc? But what? I'm clueless. You need to change .asoundrc as described in this article to redirect applications through JACK. You also have to remove PulseAudio for this to work properly. |
Wordspoken |
Comment #91: Mon, 24 Oct 2016, 10:12 (GMT+1, DST) Quote: Maarten Baert
Quote: Wordspoken
Hi. Trying to record game myself, but I'm having trouble with sound. I'm on Lubuntu 14.04.5, followed the guide on this page to set up recording through JACK. If I set driver in jack to dummy, I get sound from applications but they record nothing, if I set driver to alsa I get no sound. So I need to change something at .asoundrc? But what? I'm clueless. You need to change .asoundrc as described in this article to redirect applications through JACK. You also have to remove PulseAudio for this to work properly. Yes, after testing more I noticed that the plugin just works. I can tell because both Audacity and VLC work with it (can listen and record sound). The problem is other applications have trouble detecting "jack bridge", SSR and plugin instructions given here work as is, I need to troubleshoot elsewhere. I never have had pulseaudio installed btw, but I do see a channel for Pulseaudio for some weird reason. Guessing some other program put it in there? Shouldn't affect, I'm sure, as I don't have "pulseaudio" package anyways. |
Maarten BaertAdministrator |
Comment #92: Tue, 25 Oct 2016, 1:24 (GMT+1, DST) Quote: Wordspoken
Yes, after testing more I noticed that the plugin just works. I can tell because both Audacity and VLC work with it (can listen and record sound). The problem is other applications have trouble detecting "jack bridge", SSR and plugin instructions given here work as is, I need to troubleshoot elsewhere. I never have had pulseaudio installed btw, but I do see a channel for Pulseaudio for some weird reason. Guessing some other program put it in there? Shouldn't affect, I'm sure, as I don't have "pulseaudio" package anyways. Can you show me the contents of your .asoundrc file? |
Wordspoken |
Comment #93: Tue, 25 Oct 2016, 13:45 (GMT+1, DST) Sure. pcm.!default { type plug slave { pcm "rjack" } } # ALSA-to-JACK bridge pcm.jack { type plug slave { pcm "rjack" } hint { show on description "JACKbridge" } } pcm.rjack { type jack playback_ports { 0 "system:playback_1" 1 "system:playback_2" } capture_ports { 0 "system:capture_1" 1 "system:capture_2" } } |
Maarten BaertAdministrator |
Comment #94: Wed, 26 Oct 2016, 2:23 (GMT+1, DST) Can you also post the output of aplay -l and aplay -L? |
Wordspoken |
Comment #95: Wed, 26 Oct 2016, 9:42 (GMT+1, DST) with .asoundrc: aplay -l **** Luettelo PLAYBACK laitteista **** kortti 0: PCH [HDA Intel PCH], laite 0: ALC892 Analog [ALC892 Analog] Alalaitteet: 1/1 Alalaite #0: subdevice #0 kortti 0: PCH [HDA Intel PCH], laite 1: ALC892 Digital [ALC892 Digital] Alalaitteet: 1/1 Alalaite #0: subdevice #0 kortti 1: NVidia [HDA NVidia], laite 3: HDMI 0 [HDMI 0] Alalaitteet: 1/1 Alalaite #0: subdevice #0 kortti 1: NVidia [HDA NVidia], laite 7: HDMI 0 [HDMI 0] Alalaitteet: 1/1 Alalaite #0: subdevice #0 kortti 1: NVidia [HDA NVidia], laite 8: HDMI 0 [HDMI 0] Alalaitteet: 1/1 Alalaite #0: subdevice #0 kortti 1: NVidia [HDA NVidia], laite 9: HDMI 0 [HDMI 0] Alalaitteet: 1/1 Alalaite #0: subdevice #0 wordspoken@wordspoken-desktop:~$ aplay -L null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server default jack JACKbridge rjack sysdefault:CARD=PCH HDA Intel PCH, ALC892 Analog Default Audio Device front:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Front speakers surround40:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Digital IEC958 (S/PDIF) Digital Audio Output dmix:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Direct sample mixing device dmix:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Direct sample mixing device dsnoop:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Direct sample snooping device dsnoop:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Direct sample snooping device hw:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Direct hardware device without any conversions hw:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Direct hardware device without any conversions plughw:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Hardware device with all software conversions plughw:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Hardware device with all software conversions hdmi:CARD=NVidia,DEV=0 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=1 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=2 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 HDMI Audio Output dmix:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Direct sample mixing device dsnoop:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Direct sample snooping device hw:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Direct hardware device without any conversions plughw:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Hardware device with all software conversions Regular: null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server default:CARD=PCH HDA Intel PCH, ALC892 Analog Default Audio Device sysdefault:CARD=PCH HDA Intel PCH, ALC892 Analog Default Audio Device front:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Front speakers surround40:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Digital IEC958 (S/PDIF) Digital Audio Output dmix:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Direct sample mixing device dmix:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Direct sample mixing device dsnoop:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Direct sample snooping device dsnoop:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Direct sample snooping device hw:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Direct hardware device without any conversions hw:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Direct hardware device without any conversions plughw:CARD=PCH,DEV=0 HDA Intel PCH, ALC892 Analog Hardware device with all software conversions plughw:CARD=PCH,DEV=1 HDA Intel PCH, ALC892 Digital Hardware device with all software conversions hdmi:CARD=NVidia,DEV=0 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=1 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=2 HDA NVidia, HDMI 0 HDMI Audio Output hdmi:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 HDMI Audio Output dmix:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Direct sample mixing device dmix:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Direct sample mixing device dsnoop:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Direct sample snooping device dsnoop:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Direct sample snooping device hw:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Direct hardware device without any conversions hw:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Direct hardware device without any conversions plughw:CARD=NVidia,DEV=3 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=7 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=8 HDA NVidia, HDMI 0 Hardware device with all software conversions plughw:CARD=NVidia,DEV=9 HDA NVidia, HDMI 0 Hardware device with all software conversions aplay -l gives the same output with or without .asoundrc. |
Maarten BaertAdministrator |
Comment #96: Fri, 28 Oct 2016, 0:55 (GMT+1, DST) If that's correct then the application must be ignoring the default ALSA settings. Which applications have you tried? Which ones work and which ones don't? Last modified: Fri, 28 Oct 2016, 0:55 (GMT+1, DST) |
Wordspoken |
Comment #97: Fri, 28 Oct 2016, 12:50 (GMT+1, DST) Quote: Maarten Baert
If that's correct then the application must be ignoring the default ALSA settings. Which applications have you tried? Which ones work and which ones don't? I tried: Audacious,VLC,steam,WINE,youtube,twitch. Only Audacious and VLC worked. All games I tested through steam seemed to act similarly, WINE was odd since you could get testsound from winecfg, but application was soundless. |
Maarten BaertAdministrator |
Comment #98: Sat, 29 Oct 2016, 0:10 (GMT+1, DST) Quote: Wordspoken
I tried: Audacious,VLC,steam,WINE,youtube,twitch. Only Audacious and VLC worked. All games I tested through steam seemed to act similarly, WINE was odd since you could get testsound from winecfg, but application was soundless. So with the exception of wine, other things have sound but they can't be recorded? If you open QJackCtl and you look at the connections, do you still see the applications appear in the list? Youtube and Twitch may be using Flash which is known to be problematic. It ignores ALSA settings. Steam is not one application, results vary between games. If you have the Steam runtime enabled, it's possible that they won't support JACK because there is no JACK support in the Steam runtime. You would have to get the ALSA-to-JACK plugin from Ubuntu 12.04 and install those files in the Steam runtime. Or disable the Steam runtime completely, but that's not so easy. I'm afraid that you've picked applications that are difficult to connect to JACK. Actual native Linux apps usually work much better. |
Wordspoken |
Comment #99: Sat, 29 Oct 2016, 14:10 (GMT+1, DST) Quote: Maarten Baert
So with the exception of wine, other things have sound but they can't be recorded? If you open QJackCtl and you look at the connections, do you still see the applications appear in the list? No, none of the applications give sound. Last time I checked, only Audacious shows in QJackCtl in connections. Quote
Youtube and Twitch may be using Flash which is known to be problematic. It ignores ALSA settings. I'm not looking to record youtube/twitch, mentioned only for reference, I thought it was useful to test lots of applications, might see where the trouble is. Quote
Steam is not one application, results vary between games. If you have the Steam runtime enabled, it's possible that they won't support JACK because there is no JACK support in the Steam runtime. You would have to get the ALSA-to-JACK plugin from Ubuntu 12.04 and install those files in the Steam runtime. Or disable the Steam runtime completely, but that's not so easy. I'm afraid that you've picked applications that are difficult to connect to JACK. Actual native Linux apps usually work much better. |
Maarten BaertAdministrator |
Comment #100: Sat, 29 Oct 2016, 22:19 (GMT+1, DST) Well I can't really fix that. The problem is apparently that some of those applications are ignoring the JACK plugin that you have set up in your .asoundrc, and they just try to play sound as usual instead of going through JACK. This won't work because JACK is already using the sound card so the applications can't get access anymore. I don't know exactly why those applications are ignoring JACK, so there is no easy solution unfortunately. If you don't need a microphone, you can try to do a physical loopback instead. Connect your headphone jack to the microphone jack, like I described at the top of this article. This definitely works :). |
Francoisphil |
Comment #101: Wed, 9 Nov 2016, 9:20 (GMT+1, DST) Thank you for your Simple screen recorder , it works great, the only thing missing for me is a Scheduler , or the way to stop the recording automatically with saving of the file.I use it to record some TV programs that i cant see otherwise. |
Shneekeythelost |
Comment #102: Wed, 4 Jan 2017, 20:33 (GMT+1, DST) There is now a dead easy way to use ALSA to record your audio and game audio without having to use JACK or jump through hoops or anything. This requires using an analog headset with the prongs going into the front headset/mike plugs. Not sure if this will work for a USB headset or not, but probably not. First off, you'll need one of many different ALSA mixers. Find one, use it. You should see a bunch of sliders. There's going to be two labeled 'front mike', one is able to be muted, and probably is by default, the other just doesn't have a mute button. Adjust both front mike sliders (I would strongly advise AGAINST maxing them, try middle of the slider bar first), then un-mute. You should hear yourself over your mike in your headset. However, unlike the looping thing through Pulse, you don't have a brief delay which can be so annoying. Now just record monitor of (I use monitor of analog just to be sure, but default should work), and you should get both game and mike audio. No looping, no JACK, it just works. Then when you are done recording, head to the ALSA mixer, mute the mike, and you're good to go. I did this with a Razer Kraken Pro, but any headset which plugs in to the front of your tower should work using this method. |
Maarten BaertAdministrator |
Comment #103: Thu, 5 Jan 2017, 3:13 (GMT+1, DST) Quote: Shneekeythelost
There is now a dead easy way to use ALSA to record your audio and game audio without having to use JACK or jump through hoops or anything. This requires using an analog headset with the prongs going into the front headset/mike plugs. Not sure if this will work for a USB headset or not, but probably not. First off, you'll need one of many different ALSA mixers. Find one, use it. You should see a bunch of sliders. There's going to be two labeled 'front mike', one is able to be muted, and probably is by default, the other just doesn't have a mute button. Adjust both front mike sliders (I would strongly advise AGAINST maxing them, try middle of the slider bar first), then un-mute. You should hear yourself over your mike in your headset. However, unlike the looping thing through Pulse, you don't have a brief delay which can be so annoying. Now just record monitor of (I use monitor of analog just to be sure, but default should work), and you should get both game and mike audio. No looping, no JACK, it just works. Then when you are done recording, head to the ALSA mixer, mute the mike, and you're good to go. I did this with a Razer Kraken Pro, but any headset which plugs in to the front of your tower should work using this method. So you're saying that the 'monitor' feature in PulseAudio is able to capture not just sound from applications but also microphone sound if you enable hardware playthrough in the ALSA mixer settings? That's really surprising actually, I thought that PulseAudio didn't work that way. Edit: I just tried this but I'm not getting any microphone sound in SSR. Are you sure that you didn't have any loopback plugins running in the background? Last modified: Thu, 5 Jan 2017, 3:19 (GMT+1, DST) |
Xeno |
Comment #104: Tue, 13 Jun 2017, 21:14 (GMT+1, DST) Hello! |
Maarten BaertAdministrator |
Comment #105: Mon, 19 Jun 2017, 22:30 (GMT+1, DST) Quote: Xeno
Hello! What? SSR doesn't even use GStreamer. Where do you see that error? |
Anton |
Comment #106: Fri, 3 Jul 2020, 15:29 (GMT+1, DST) Recording game audio using ALSA: First, load the snd-aloop module: sudo modprobe snd-aloop This will create a new device called Loopback: cat /proc/asound/cards 0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xc1814000 irq 60 1 [HDMI ]: HDA-Intel - HDA Intel HDMI HDA Intel HDMI at 0xc1810000 irq 61 2 [Loopback ]: Loopback - Loopback Loopback 1 From the information shown above we have to create two hw devices: hw:0,0 (PCH is my main sound card). Normally, hw devices have the form: hw:X,Y. For our purposes, it seems that Y for the main card is always 0 while for the Loopback we have Y equals 1. Now, in order to make all of this work, we need a ~/.asoundrc file with the following: pcm.!default { type asym playback.pcm LoopAndReal #capture.pcm looprec capture.pcm "hw:X1,Y1" } #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.MixReal 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.MixReal { type dmix ipc_key 1024 slave { pcm "hw:X1,Y1" #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 } } Modify hw:X1,Y1 with the values for your main card (in my case hw:0,0). You can test that this configuration works by playing something in your computer. If you hear it, so it is fine. Now let's play something in the computer, and record it from this virtual device with ffmpeg: ffmpeg -f alsa -i hw:X2,Y2 -c:a libmp3lame -b:a 256k -vn capture.mp3 Where hw:X2,Y2 has to be replaced by the Loopback device, in this case hw:2,1. [img]https://fastpic.ru/fullview/112/2020/0703/d30c0803168e0a8eff065f0fffcd6ea3.png[/img] Last modified: Fri, 3 Jul 2020, 16:32 (GMT+1, DST) |
Carloshe5 |
Comment #107: Sat, 27 Feb 2021, 14:10 (GMT+1, DST) after all processes installation (installing qjackctl and jackd2 via synaptic), the audio and video freeze when running on the computer. so, I installed pulseaudio-module-jack (via Synaptic). after that a new option appears when I start the Jack Audio Connection kit on the output audio called Jack sink (PulseAudio JACK Sink). You need to change the output for it. With that the simplescreenrecorder works fine recording the computer audio and my microphone. Audio: Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Hewlett-Packard |
Mpescador |
Comment #108: Thu, 2 Dec 2021, 17:23 (GMT+1, DST) There seems to be different approaches for recording *both* game audio *and* mic audio. Any updates on the best method? For instance, has anyone used SSR with PipeWire? Last modified: Thu, 2 Dec 2021, 18:17 (GMT+1, DST) |
Wildpenguin |
Comment #109: Thu, 12 May 2022, 17:48 (GMT+1, DST) Hi! First, thanks for this excellent app =). However I think the Recording only game audio might not reflect what the user expects! I get that many users want to record audio without their mic when e.g. streaming and commenting (their gameplay). But what is actually instructed here is how to not record mic (while live streaming / directing the audio from mic somewhere else). But there is another important use case: record only game audio, literally (despite whatever else is being played back). This might include other players in a multiplayer voice chat, say, via Discord, or music being played back via an audio player (this should be obvious for copyright reasons, too - the recorded audio will be useless in case it contains copyrighted audio, unless it is used for private purposes only, of course). EDIT: I've found a way and also tested it works! Help came from AskUbuntu (but applies to most distros, probably any which use PulseAudio). So to re-iterate, you have many programs producing audio, but only want to record the game (or a set of applications) while hearing them all, too. In this case, the gist of what needs to be done is this: pacmd load-module module-combine-sink sink_name=rec-mon-vol slaves=alsa_output.pci-0000_2f_00.4.iec958-stereo sink_properties=device.description="Recording-Monitor-Volume" Replace alsa_output.--- with the sink you want to play back the game from. Now you can choose which applications go this new sink (use whatever you've used to control this before), and choose "Monitor of Recording-Monitor-Volume" from SSR. This way you can not control recording and playback (monitor) volume of the application(s) being recorded, as Pulseaudio does not let you control them separately. If you want to do that, you could create another module-combine-sink: pacmd load-module module-combine-sink sink_name=rec-n-play slaves=rec-mon-vol sink_properties=device.description="Record-and-Monitor" More examples in the question I've linked. This way by chaining, let the first one control recording volume (presumably 100%) and the latter one playback (monitor) volume. Downside is that recording volume needs to be 100% and playback can be decreased (or muted), but for most sane cases this is what is needed. The same could be done with null outputs and loopbacks. p.s. [EDIT/moved here] A nice feature would be that SimpleScreenRecorder can choose one application to record (instead of "monitor of..." devices) , to get clean audio from that application only. I'm not sure if that would be an easy feature to add or not and how much effort it would take, nor how many users would find it useful. EDIT2: Ooops, I think my comment right here is somewhat useless.... actually, just by moving the application streams around the example null outputs and speaker sink can cater towards most users needs. To remove some confusion, I would suggest renaming the null outputs (the yellow boxes) on this page as duplex_out -> record_only and game_out -> play_and_record, and mention one can move any application stream to any sink (the nulls or speakers=playback only). Things do become a bit hairy in case the user wishes to control the volume of these separately (as application stream changes volume for everything, but one can "split" sources with null and loopbacks), but that's just about it. I've added an example in the AskUbuntu question I've linked for including volume control for both recording and playback for one application. Sorry for this very confusing comment, which it might seem after all the edits! Last modified: Fri, 13 May 2022, 14:26 (GMT+1, DST) |