[Solved] Record My Desktop: Broken Pipe! Overrun Occurred.

If you are using RecordMyDesktop and you keep getting the Broken Pipe! Overrun Occurred message printing out when you start RMD from a terminal then have no fear. It took a combination of 2 things before I got rid of these error messages completely. The most annoying part is that when these messages occur then there are squeaks and pops in the audio and I even experienced audio/video desynchonisation after recording a moderately long clip. This is obviously unacceptable and I made it my mission for a few days to conquer what was going wrong here.

Trick #1

Trick #1 is to use the plughw:0,0 device instead of the hw:0,0 device. As to what is different between them I have no idea but when using plughw there are noticeably less broken pipes and smoother audio. This did not take away all of my recording anguishes however. This is an example command that I would use utilizing the plughw device:

recordmydesktop --fps 10 --device plughw:0,2 --buffer-size 100000 --windowid 0x00000000 --height 720 --width 400 --on-the-fly-encoding -o output.ogv

Trick #2

Trick #2 is a little less obvious than the first trick and I'm not sure if it will work for everyone. This trick is taken from an Ubuntu bug report on recordmydesktop. All you need to do is increase the pre-allocation buffer size for the capture stream. This is done easily via echoing a larger value into a special file in /proc/. On my machine I issue the following command as root to get this done:

echo 512 > /proc/asound/card0/pcm1c/sub0/prealloc

or if you roll non-root style then this will be equivalent

echo 512 | sudo tee /proc/asound/card0/pcm1c/sub0/prealloc

Note that the "c" in "pcm1c" stands for capture and you should look for folders ending in "c" as you may not have "pcm1c" exactly.

After that you should be able to record sound with no blasted broken pipes making your audio sound all shitty. Please comment and tell me if this works for you or not!

Leave a Reply