MaartenBaert / ssr

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

video and audio recording at accelerated rate. #247

Open u83rmensch opened 10 years ago

u83rmensch commented 10 years ago

Im not quite sure how to describe how this is happening, mostly because I have no idea why.

so I try to use SSR to record dota 2 matches. I'd rather not setup JACK and dont want to hear my self in my head phones ect.. so I figured a reasonable work around would simply be to use two recorders at once, I launch SSR twice and have one recording for audio from my mic input only and one that records the screen and all the audio output from the pc (or anything outputting to my headphones to be specific).

I've tested this playing Counter strike GO and playing against bots in Dota2 and it works well enough. having to put the audio into the other clip using a video editor is a bit of a nuisance but I cant really even get to that point yet anyway and here is why.

for whatever reason, when I play a full match in dota, the audio and video do not record right. The audio and video are recorded and thus played back at an accelerated rate. this doesnt make a whole lot of sense to me as doing this should make the over all video shorter. the lat one I tried to do ended up being about 52 minutes long. My dota match was only 51 minutes long + some chat and banter before and after to fill those little gaps.

I should also mention that I use Team speak 3 when playing, however when playing a shorter bot match and using Team speak at the time, I do not experience this problem. The only thing that seems to be significantly different is 1) the play time. a full dota match can last any where from 20 to 60 minutes and a longer game would obviously result in a much larger video file and 2) I dont use the in game mic with bots for obvious reasons but I would use it in game when playing with real people as our team is not always a full 5 man team.

Do you think either of those two variables would have any bearing on why playing a full match would have such drastically different results.

also, on top of the speed up in vide/audo.. the audio quality is noticeably worse when this happens with pops and crackles.. however it doesnt do this normally with the same settings. only when I play a full bot match :(

MaartenBaert commented 10 years ago

Running SSR just to record audio is not recommended, you're wasting a lot of processing power because you can't disable video. Use a stand-alone audio recording application (such as the 'sound recorder' that comes with some distributions, or Audacity).

If you use two separate programs to record audio, they will very likely go out of sync. This is why people want support for two audio streams in SSR and also why it's so hard to implement properly.

I'm guessing you are using PulseAudio monitors to record your speakers. Monitors have always been buggy. The workaround in my article (disabling alternative sample rate) solves one of the most obvious bugs, but there are others that can still mess up your recording. This is why I recommend JACK in that article. I know it's not easy to set up, but right now it's the only thing that actually works reliably.

You can create a completely PulseAudio-free setup with ALSA and JACK that works well for almost all programs. The two exceptions I've found are applications that require PulseAudio (such as Skype, after their latest update), and WINE applications (this turned out to be a bug in ALSA which has now been patched, but it may still take some time before the patched version is available in all distributions).

SSR always ensures that the length of the recording stays correct and will resample the audio if necessary. If your sound system is buggy (i.e. you are using PulseAudio), SSR may be forced to do some rather extreme resampling to keep things in sync, which can result in noticeable pitch changes.