Skip to content

screencastService: Add gstreamer pipeline for h264 encoding

Jonas Dreßler requested to merge verdre/gnome-shell:recorder-openh264 into main

Add a pipeline 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: !2080 (merged)

#7335

Merge request reports