GNOME Bugzilla – Bug 740106
openh264enc: Properties for multi-threading and fastest performance
Last modified: 2018-02-12 19:22:35 UTC
Currently openh264enc uses only one slice which forces it to only use one thread as threading is slice-based. The following pull request against openwebrtc-gst-plugins on github adds a slice-mode property that can be either n-slices or auto. If auto it will use a number of slices per frame equal to the number of threads. If n-slices, it will use a number of slices per frame equal to the num-slices property. Some other properties were also added that improve performance when disabled. The defaults remained intact with one exception. As a final and separate commit I changed the slice-mode default to auto in order for the default behaviour to be threads=0 slice-mode=auto which makes openh264 use a number of threads and slices according to your CPU. Patches here: https://github.com/EricssonResearch/openwebrtc-gst-plugins/pull/15 Note: openh264 currently limits the maximum number of threads to 4 - https://github.com/cisco/openh264/issues/1489
See my comments in the github pull request. Merging this into gst-plugins-bad will require the patch to be rebased
This seems to have been done ages ago (though I note that slice-mode defaults to "n-slices" and not "auto").