Jonas Dreßler db490dbaf7 screencastService: Add gstreamer pipeline for h264 encoding
Add pipelinea for h264 software encoding using openh264. This is the least
problematic (from a patent perspective) software encoder for h264, Fedora
ships it in a pre-installed repo and it can be enabled very easily. Most
people should have it enabled already to allow for decoding of h264 content.
Unlike vp8enc, this encoder is optimized for realtime and is really fast, it
outperforms the vp8 encoder by an order of magnitude and should allow for
smooth recordings even on older hardware.

The reason why mp4 was chosen as a container format over mkv is that mp4
can be played inside firefox and chromium, whereas mkv can't be played.
It's ensured that the mp4 file is still playable in case the recording
got cancelled by using the "first-moov-then-finalise" fragment-mode on
mp4mux.

Even though h264 is problematic from a patent perspective and often can't
be shipped by default, it still the best supported and most popular codec
out there. The software encoders and decoders are really fast, it's used
everywhere on the web, and it can be hardware decoded on almost any device
out there.

See also: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2080

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7335

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3211>
2024-03-01 12:08:54 +00:00
..