MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.52k stars 287 forks source link

Team Fortress 2 (steam) game audio isn't recorded #241

Open polprog opened 9 years ago

polprog commented 9 years ago

I did both ways, both fail: http://www.maartenbaert.be/simplescreenrecorder/recording-game-audio/ Using Pulseaudio, having all the settings done as there, when I try to record Mic + Game Audio, only Mic gets captured. When recording Mic + some mp3 from VLC, both record OK. I assume it's probably. When i try to record using jack the game audio is dead. Already submitted that bug to TF2 tracker.

bucaneer commented 9 years ago

Make sure the game is using PulseAudio by setting environment variable SDL_AUDIODRIVER=pulseaudio, e.g. by starting Steam like this: env SDL_AUDIODRIVER=pulseaudio steam or adding this to the game's launch options in Steam (right click -> Properties -> Set Launch Options): env SDL_AUDIODRIVER=pulseaudio %command%

MaartenBaert commented 9 years ago

@bucaneer I considered that too but it doesn't make sense. If the game is using ALSA, it should be redirected to PulseAudio. If that fails somehow, then the loopback wouldn't be able to play back the sound from the microphone through PulseAudio since the sound card is already taken. But it's worth a try I guess.

ubuntuaddicted commented 9 years ago

you must not be setting up your loopbacks and nullsink correctly because I currently use "the hard way" and am able to record the game audio+my webcam audio just fine and then I tell SSR to record/stream the nullsink which the 2 loopbacks push into

polprog commented 9 years ago

@ubuntuaddicted I'm setting the loopbacks correctly, as i stated before. Both easy way and hard way fails to capture TF2 sound but vlc and other sounds are captured. Could you tell me how did you configure this?

bucaneer commented 9 years ago

@MaartenBaert It can and does happen on my setup where Pulse plays through ALSA without grabbing exclusive lock on the hardware (as described here). That way I can have separate but concurrent audio output from both ALSA and Pulse, only one of which gets recorded.

polprog commented 9 years ago

@bucaneer i tried it. Now there's no game audio :smile: EDIT: Whoops! Actually it works :) Just had to eanble TF2 sound on pavucontrol

polprog commented 9 years ago

But... There's still a problem When i record, i have a small latency, but enough, to make me look like a total n00b :P Is there any way to fix it?

MaartenBaert commented 9 years ago

PulseAudio does add some latency, there's not much you can do about that.

bucaneer commented 9 years ago

@TheKiwi5000 If you mean audio delay compared to video, it might go away by tweaking some PulseAudio settings. In particular, I recall default-fragments and default-fragment-size-msec in /etc/pulse/daemon.conf having some effect on audio latency. These values work for me:

 default-fragments = 5
 default-fragment-size-msec = 5

Try playing around with the numbers and see if they fix anything. Don't forget to restart PulseAudio (pulseaudio -k && pulseaudio -D) each time you do though.

polprog commented 9 years ago

@bucaneer i mean the video lag on my screen. it's about 25ms. PulseAudio is ok.

bucaneer commented 9 years ago

Perhaps try unchecking "Limit application frame rate" under OpenGL settings in SSR (if you have it checked).