Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
pavucontrol

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
add comment

1 Answer 1

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

Kazam

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

Tibesti

See the article Tibesti screencasting tool for Linux.

recordMyDesktop

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

share|improve this answer
add comment

Your Answer

 
discard

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.