I used to have an ffmpeg command line that I used to video record a window on my linux desktop, but it stopped working a while ago and I didn’t want to dig into the man pages to figure it out all over again. So, I went looking online to try and see what other people had done.
The best solution I found is a little shell script with a tiny bit of GUI added via zenity. It is called Capture Me, and you can download it at that link. I haven’t ever tried it with capturing audio as well as video, but it will probably work too.