Step 2: Record

Parameters

x11grab: Record the desktops: Size of the recording area (For true HD it would be 1920×1080 i.e 1080p). However, it depends upon your monitor resolution. Anything greater will fail, Use Displays to find the resolution.r: Frame rate. If you intend to record game play videos, adjust the frame rate until you don’t get choppy output.-f and -i: These two variable are for audio. If default does not work, use “pulse” instead.

Step 3: Switching between internal audio and microphone

While recording, open PulseAudio Volume Control (pavucontrol) and in the Recording section, switch between microphone and Internal audio (see figure below). Use “Built-in Audio Analog Stereo” for recording from microphone and “Monitor of Built-in Audio Analog Stereo” to record sound playing in your computer. Make sure you are actually recording the desktop to change these options, ffmpeg option does not show up in pavucontrol until you start the recording.

Step 4: Create a script

Create a script, say recorddesktop.sh, so that you don’t have to remember it all the time. Create the bash file in a directory you use to add scripts e.g ~/bin (/home/username/bin) and add it to PATH variable in .bashrc as (export PATH=$PATH:~/bin). Content of that file would be something like this (Adjust resolution and other parameters as you prefer).