Ubuntu 18.04 uses Wayland, which gtk-recordmydesktop does not support (AttributeError: 'NoneType' object has no attribute 'get_pixel'). I ried pressing Ctrl+Shift+Alt+R it freezed my computer and I had to hard-reboot it after 5 minutes.

How to record my Ubuntu 18.04 desktop?

Gratis, ideally open source.

Outputs video in a format that YouTube can digest, if possible without needing intermediate conversions.