MaartenBaert / ssr

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

SimpleScreenRecorder 0.3.0 Crashes on ubuntu 14.04 #223

Open Levan7 opened 10 years ago

Levan7 commented 10 years ago

I been experiencing this problem for some time now, SSR just randomly crashes and the output file is pretty much useless. Here are two terminal outputs, both times SSR crashed.

https://drive.google.com/file/d/0B2EbWg9VhdvaSVcyTHlieGcyY1k/edit?usp=sharing https://drive.google.com/file/d/0B2EbWg9VhdvaeG56X1I0aUx3MG8/edit?usp=sharing

iamgreaser commented 10 years ago

Personally I blame PulseAudio.

For audio input, use ALSA, and use one of the hw: devices directly (hw:0,0 is probably what you want).

If you'd rather monitor programs that are actually running, there's a few options:

If the app you are trying to record uses SDL 1.2, I have a fork of SDL which adds a driver for JACK.

Levan7 commented 10 years ago

@iamgreaser I should Point out that if I use libxvid I have no problem recording.

MaartenBaert commented 10 years ago

It's rather hard to debug a problem like that considering the vast amount of desync error messages that PulseAudio is generating. Even if SSR hadn't crashed, the audio would probably have been unusable ...

I still don't understand why PulseAudio keeps producing these ridiculous timestamps. The monotonicity warning appears because PulseAudio is going at least 10ms backwards. Maybe I should just get rid of the (clearly broken) latency estimation and accept the extra latency, it will probably improve reliability.

What were you doing with PulseAudio when this problem occurred? Were you using the 'null sink' hack to record two sources at the same time?

Can you reproduce the problem with pure ALSA (i.e. a hardware device, without PulseAudio)?


I believe there's some way to set ALSA up so that you can capture audio from a program into a sink. Someone else will have to fill me in for this.

The loopback device (snd-aloop), but then you don't get any sound through your speakers. It is extremely reliable though. And you can use the 'alsaloop' utility to route the sound from the loopback device to the real sound card if you don't mind the extra latency.

Levan7 commented 10 years ago

@MaartenBaert I apologize for a very late reply. Here is what I got. Well I selected Alsa [Default] Default source, because other sources does not work. https://drive.google.com/file/d/0B2EbWg9VhdvaMlNiSXRkNk5YM1k/edit?usp=sharing Well this thing was mostly rock solid, could not crash it and the audio was very well synced.

Then I tried pulsaudio and h264, this is what i noticed. This is the first output crashed https://drive.google.com/file/d/0B2EbWg9VhdvaUWZRdlFtQzdvSW8/edit?usp=sharing Second time it crashed https://drive.google.com/file/d/0B2EbWg9VhdvaRlNCeUVCazRrdFk/edit?usp=sharing third time I noticed that SSR starts to have problem if Pulse audio volume control is running, i started the Pulse audio volume control and started ssr as you can see it has problems. https://drive.google.com/file/d/0B2EbWg9VhdvaNV85VnJuTlhZem8/edit?usp=sharing fourth i did not have Pulse audio volume control application opened and the software did not have any problems. https://drive.google.com/file/d/0B2EbWg9VhdvaRHdzbWNpaVlqdnc/edit?usp=sharing

I do not know how much it might be related but that is what is happening

MaartenBaert commented 10 years ago

@Levan7 What you are describing suggests that the problem is caused by PulseAudio's broken latency detection which then triggers some yet-unknown bug in SSR. Stick to the ALSA 'default' source for now, it is routed through PulseAudio but it lacks latency detection, so it is not affected. I will probably get rid of the PulseAudio latency code in the next version.

Were you running any other programs that did anything audio-related (other than pavucontrol)?

Levan7 commented 10 years ago

@MaartenBaert

I think that might be the case, I tried to stress out the CPU and when I started the SSR and then started the "stress process" the terminal want crazy with this massage [Synchronizer::ReadAudioSamples] Warning: Too many audio samples, dropping samples to keep the audio in sync with the video however after I stopped the stress process I could use the ssr it did not crash. However when pulsaudio volume control is running SSR is very likely to crash, but if I am using ALSA it runs like a champ.

aronschatz commented 8 years ago

I hate to drag up an old issue, but I'm having this problem creep up.

I'm attempting to record a few games using steam on Kubuntu 15.10. I'm getting this...

[Synchronizer::ReadAudioSamples] Warning: Received audio samples with non-monotonic timestamp.

And sometimes...

[PulseAudioInput::InputThread] Error: pa_stream_peek failed! [PulseAudioInput::InputThread] Exception 'PulseAudioException' in input thread. [Synchronizer::ReadVideoFrame] Warning: Video buffer overflow, some frames will be lost. The audio input seems to be too slow.

Which is really bad since the entire audio completely crashes until the application is restarted. I can't use ALSA (no game sound is detected).

This is happening with Broforce and Shovel Knight.

MaartenBaert commented 8 years ago

PulseAudio is known to be buggy. There's a reason why I recommend JACK to everyone. I have already applied quite a few workarounds for PulseAudio bugs, but some things can't be fixed. As soon as you start to use monitors, PulseAudio starts producing glitches.

yk2kus commented 8 years ago

I recorded and tried to play got no audio then noticed this warning on dialog box. is there anyway I can get audio of the clip?

MaartenBaert commented 8 years ago

If the clip has no audio, then there is no audio ... you can't magically bring back what isn't there.

yk2kus commented 8 years ago

@MaartenBaert :+1: I get that but the warning was like audio is without timestamp so may be it is there but not supported? warning msg was "Warning: Received audio samples with non-monotonic timestamp." So I was wondering if there are audio samples and can be fixed?

MaartenBaert commented 8 years ago

If you send me the clip (the original file, not through e.g. YouTube), I can give it a try. But I doubt that I will find anything if you can't hear it.

yk2kus commented 8 years ago

@MaartenBaert :+1: Thank you. I got stuff resolved (without clip offcourse) :)