How to record your desktop with audio from a mic feed in Linux

Simple command, using FFMPEG:

ffmpeg -f x11grab -r 25 -s 1360x768 -i :0.0 -f alsa -ac 2 -sameq -i pulse -vol 500 ./output.mkv

Change your desktop resolution from 1360×768 to match your desktop. If needed, the option “-vol 500” amplifies the volume 5x. This may be needed on some mics that do not have any mic boost set (I had to use it on mine). You can increase this number to 1000 or 2000 (10x, 20x), etc.

The “-r 25” is the frame rate option. You can increase this to 30 or decrease it if you want to reduce the file size without compromising quality, but the video will miss a lot of moments in between captures: 25 should be the lowest setting.

You can run a “man ffmpeg” to research what each options does, but this will give a well-compressed video file with audio for a screen capture of your desktop.