-
-
Notifications
You must be signed in to change notification settings - Fork 37
Hardware acceleration
Clapper uses hardware acceleration by default, when available both CPU and RAM usage should be much lower.
GStreamer now has two different plugins that provide hardware acceleration vaapi
(provided by gstreamer-vaapi) and newer va
(part of gst-plugins-bad). By default older vaapi
plugins are used, you can try new va
experimental decoders in Clapper Preferences->Advanced->GStreamer
by changing their default rank (e.g. apply rank 300 to vah264dec
and so on).
On some older GPUs you might need to export GST_VAAPI_ALL_DRIVERS=1
environment variable.
Hardware acceleration on Nvidia GPUs is supported through NVDEC. This requires Nvidia proprietary GPU drivers.
In order to force the usage of NV codecs (including systems that have VAAPI capable iGPU), open Clapper preferences, go to advanced page, add nvh264dec
to the list and apply a rank to it higher then any other GStreamer decoder (e.g. 300). Repeat those steps for every codec you wish to have decoded via your Nvidia GPU. List of these can be found here.
If you want to use stateless decoders such as nvh264sldec
and nvh265sldec
with fewer features but improved latency. You can set the environment variable GST_USE_NV_STATELESS_CODEC=h264
to use the stateless decoder variant as nvh264dec
instead of the "normal" NVDEC decoder implementation.
V4L2 stateless decoders are gradually added to GStreamer during 1.19 development and are used by default on mobile/embedded devices. Mobile devices usually use GL ES instead of OpenGL, so users should manually tell GStreamer to use it by exporting GST_GL_API=gles2
environment variable.
Due to a bug in GStreamer playbin2
element, GstVideoMeta
is not passed through pipeline which causes the v4l2
decoders to copy frames and reduce performance. In order to workaround this bug you can use newer playbin3
element with GST_CLAPPER_USE_PLAYBIN3=1
environment variable.