Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to record both video, speaker sounds and microphone sounds at the same time. To deal with the audio, I set up two loopbacks (one for microphone, one for speakers):

pactl load-module module-loopback
pactl load-module module-loopback

Using pavucontrol, I redirect both loopbacks to a null-sink, which is the audio input for my ffmpeg recording script:

pactl load-module module-null-sink

I then start recording with the following command:

ffmpeg -f x11grab -y -r 60 -f alsa -i pulse output.mkv

Everything seems to work perfectly, for the first 20-25 seconds of output.mkv. After that, sound becomes horribly distorted until the end of the file. Here's a similar report from another user.

Is there a way to fix/avoid the distortion?

Or, is there an alternative way to record both microphone and speakers at the same time (that doesn't cause distortion)?

share|improve this question
up vote 1 down vote accepted

There are utilities that will do all the work for you.


See the article Record Desktop With Both Speaker And Microphone Audio On Linux/Ubuntu.


See the article Tibesti screencasting tool for Linux.


See the article Record Screen Activity in Ubuntu with RecordMyDesktop.
This product seems to require more fiddling.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.