Record a screencast with audio on linux

Here’s how I recorded my screen, with audio from the microphone, from my Ubuntu 20.04 machine:


sleep 10 && ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0+0,0 -f pulse -ac 2 -i default ~/Videos/screencast.mp4

Reference: https://trac.ffmpeg.org/wiki/Capture/Desktop