How to do screen recording on Wayland in Linux?
Posted on In TutorialHow to do screen recording on Wayland in Linux? Many screen recorders do not work on the new Wayland.
Table of Contents
Using Green Recorder
You may try Green Recorder which supports Wayland.
Note: Green Recorder is no longer under development by the original author (Please check the project README for more details). It still works well for most usage scenarios.
If you use Ubuntu 18.04, you may install Green Recorder from the following PPA:
sudo add-apt-repository ppa:fossproject/ppa
sudo apt update
sudo apt install green-recorder
Using Gnome’s screen recording tool
Gnome 3 has a built-in screen recording functionality. To start, press Alt+Ctrl+Shift+R
and the recording will start. There should be a red icon on the top right message tray of your screen. To stop recording, press the red icon or press Alt+Ctrl+Shift+R
again.
The video file will be in webm format and saved in the Video directory on your home directory.
Increase the duration of screencast videos
The screen recording functionality has a maximum length limit which is just 30 seconds long by default. The default length isn’t ideal if you plan to make a lengthy video. Good news is that it is possible to increase the duration manually. Modify the following gsettings string in command like using the gsettings
command line tool as follows
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 600
Replace the 600
value with the number of seconds you want.
green-recorder has been discontinued as of autumn of 2019, and it works with Python2 only. So, still looking for a screen recorder on GNOME/Wayland.
See https://github.com/Ian2020/EasyScreenCast for a really good, simple screen recorder for gnome wayland.
I couldn’t find a good screen recorder for Wayland. So I made one https://github.com/HasinduLanka/screencorder
It’s stable and working well on Wayland.
If you know HTML/JS well, you can contribute to make frontend better
How this screen recorder works on wayland?
Most screen recorders out there do not work on wayland. Why?
Because wayland is much secure than old X11. Wayland doesn’t let every program to see what others doing. It’s a bit harder to gain access. But web browsers, like Chromium have handled these security features properly. That’s why we use a local Progressive Web App as the frontend and a backend written in Go. The PWA records the screen and sends them to the backend as blobs. Backend records system sounds and combines all together in realtime.