gnome-shell/js/dbusServices
Jonas Dreßler 51bf7ec176 screencastService: Improve the gstreamer pipeline for recording
The current gstreamer pipeline performs quite bad on slower machines and
is dropping lots of frames, improve the pipeline by changing a few
things:

- Use threads for videoconvert and improve speed of videoconvert by
disabling some unneeded things
- Add a queue before the encoding step, this allows the encoder to work
at its own pace and will lead to a lot more stability
- Remove the fixed quantizer and only set a max quantizer, this helps
quite a bit with performance
- Change the deadline parameter of vp8enc to 1: This makes the encoder
go into real time mode, which will make it a lot faster
- Set cpu-used to 16, the maximum possible value.
- Set static-threshold to 1000, static-threshold is the motion detection
threshold, and while a value of 100 is recommended for screencasting in
the gstreamer documentation (see [1]), using 1000 appears to perform a
lot better and still outputs fairly good quality
- Set a larger buffer size than the default size, this seems to get a
bit more stability during high load scenarios

All in all, those changes make the pipeline drop no more frames when
recording at 30 FPS and 2K screen resolution. That was tested on a
fairly recent mobile core-i5 processor.

Also, because we now have two %T replacement strings for the number of
threads, we need to switch to replaceAll(). For that to work, we have to
put the %T matching expression into quotes.

[1] https://gstreamer.freedesktop.org/documentation/vpx/GstVPXEnc.html?gi-language=c#GstVPXEnc:static-threshold

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1633>
2021-05-04 13:45:57 +00:00
..
extensions extensionsService: Log error if preferences dialog failed to open 2021-05-01 21:07:36 +00:00
notifications notificationDaemon: Fix grouping by PID 2020-05-19 08:24:07 +00:00
screencast screencastService: Improve the gstreamer pipeline for recording 2021-05-04 13:45:57 +00:00
screensaver dbusServices/screensaver: Disable auto-shutdown 2021-04-28 18:12:13 +00:00
dbus-service.in dbusServices: Add some base classes for small stand-alone services 2020-03-12 16:09:27 +00:00
dbus-service.service.in dbusServices: Add some base classes for small stand-alone services 2020-03-12 16:09:27 +00:00
dbusService.js dbusService: Queue shutdown check on startup 2020-07-31 10:51:12 +02:00
meson.build dbusServices/screensaver: Split out public ScreenSaver service 2020-12-07 16:24:19 +00:00
org.gnome.ScreenSaver.src.gresource.xml dbusServices/screensaver: Split out public ScreenSaver service 2020-12-07 16:24:19 +00:00
org.gnome.Shell.Extensions.src.gresource.xml dbusServices/extensions: Include Params module 2020-03-24 10:38:24 +01:00
org.gnome.Shell.Notifications.src.gresource.xml dbusServices/notifications: Add a separate notification daemon 2020-03-12 16:09:27 +00:00
org.gnome.Shell.Screencast.src.gresource.xml Move screencasting into a separate service process 2020-07-31 10:51:12 +02:00