Ubuntu – How to record the screen

desktop-recordingscreencastsoftware-recommendation

How can I record my screen on Ubuntu?

The app I'm looking for has ideally all of these features:

  1. Can record in a format that can be played back easily on any platform and/or accepted by YouTube or another popular video site
  2. Can record just a window (instead of the whole screen), possibly selecting it with a mouse click
  3. Can start recording after a configurable delay (e.g., I launch the app and have time to do arrangements to my desktop/window before actual recording starts)

Best Answer

gtk-recordmydesktop install gtk-recordmydesktop

Adds an easy to use graphical icon on the GNOME toolbar to make a pleasure use and configure the audio and video capture and screencast application recordMyDesktop.

enter image description here

As mentioned at 20.04: Can't install gtk-recordmydesktop and on the package search, the package is not available on the main repository anymore, and sudo apt install gtk-recordmydesktop fails. I'm not sure why the http://apt.ubuntu.com/p/gtk-recordmydesktop link seems to work, maybe it installs an older version. But this indicates that the software is not being actively supported.

recordmydesktop

This is the non-GUI backend of recordmydesktop, and it is still available in 20.04:

sudo apt install recordmydesktop
recordmydesktop --on-the-fly-encoding

This will record until you stop the program on the terminal e.g. with Ctrl + C.

--on-the-fly-encoding encodes the output immediately; without it you need to wait for a possibly long time at the end for the encoding to be done. I haven't seen any significant downsides to that option yet, likely it will just take a bit more of CPU resources, but it is generally worth it.

It should be able to do everything that gtk-recordmydesktop does, but it is a bit harder to learn as you have to deal with the command lines.

You can set a stop recording shortcut e.g. with:

recordmydesktop --stop-shortcut=Control+s

You can select to record a single window as shown at: How can I get the value of Window ID?

recordmydesktop --windowid `xwininfo | grep 'id: 0x' | grep -Eo '0x[a-z0-9]+'`

This will allow you to first select the window with a mouse click, and it starts recording after you click.

How to record sound output with it: https://unix.stackexchange.com/questions/3490/how-can-i-record-the-sound-output-with-gtk-recordmydesktop

xvidcap (no longer maintained, package is no longer available)

A screen capture enabling you to capture videos off your X-Window desktop for illustration or documentation purposes. It is intended to be a standards-based alternative to tools like Lotus ScreenCam.

Video can be saved in MPEG or AVI files format.