VPS plugins integration with Gstreamer: some plugins fail to load

Environment:

  • Ubuntu 18.04
  • Gstreamer 1.14.5
  • Deepstream 5.0
  • VpsSamples taken from MIP SDK 2020 R2
  • Python 3.6

The environment has Gstreamer plugins successfully installed. I have a python application that calls Gstreamer and deepstream plugins and it works just fine.

To set up the environment for the VPS plugins integration, I followed this guide https://doc.developer.milestonesys.com/html/samples/vpservice_sample.html#setting-up-vp-service-on-linux. I reached the step where I “make” the VPService files and this step ran successfully. When I run the service with “make run”, all is looking good.

Environment variables:

  • GST_DEBUG → 2
  • GST_PLUGIN_PATH → path/to/VpsSamples/VPService/bin
  • PATH → /usr/lib/x86_64-linux-gnu/gstreamer-1.0 the location of the gstreamer .so files
  • GSTREAMER_1_0_ROOT_X86_64 → /usr/lib/x86_64-linux-gnu/gstreamer-1.0 the location of the gstreamer .so files

I try to inspect the VPS plugins and I get the following results:

  • gst-inspect-1.0 vpspasstru → factory details are successfully shown
  • gst-inspect-1.0 vpsjpegtranscoder → error 1 below
  • gst-inspect-1.0 vpsjpegtranscoder → No such element or plugin ‘vpsboundingboxes’
  • gst-inspect-1.0 path/to/VpsSamples/VPService/bin/libgstvpsboundingboxes.so → error 2 below
  • gst-inspect-1.0 path/to/VpsSamples/VPService/bin/libgstvpsxprotect.so → error 3 below

Gstreamer version 1.16.1 (minimum gstreamer requirement mentioned in the above guide) and above are not available out-of-the-box in Ubuntu 18.01. I compiled the Gstreamer components from source code for version 1.16.1 and it didn’t solve the issue. Gstreamer version 1.17.2 is only available for development so far.

Appreciate your support.

Error 1:

0:00:00.011745322 3594 0x56236117ac30 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory “fromxprotectconverter”!

0:00:00.011773225 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:146:gst_vpsjpegtranscoder_init: Failed to create header_remover element.

0:00:00.013359774 3594 0x56236117ac30 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory “xprotectjoin”!

0:00:00.013374832 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:159:gst_vpsjpegtranscoder_init: Failed to create xprotect_join element.

0:00:00.013731397 3594 0x56236117ac30 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory “toxprotectconverter”!

0:00:00.013745300 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:172:gst_vpsjpegtranscoder_init: Failed to create header_inserter element.

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.700: gst_bin_add: assertion ‘GST_IS_ELEMENT (element)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.700: gst_bin_add: assertion ‘GST_IS_ELEMENT (element)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_bin_add: assertion ‘GST_IS_ELEMENT (element)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_get_static_pad: assertion ‘GST_IS_ELEMENT (element)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_pad_link_full: assertion ‘GST_IS_PAD (srcpad)’ failed

0:00:00.013928104 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:187:gst_vpsjpegtranscoder_init: header_remover and decoder could not be linked.

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_object_unref: assertion ‘object != NULL’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_get_static_pad: assertion ‘GST_IS_ELEMENT (element)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_get_static_pad: assertion ‘GST_IS_ELEMENT (element)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_pad_link_full: assertion ‘GST_IS_PAD (srcpad)’ failed

0:00:00.014019096 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:196:gst_vpsjpegtranscoder_init: header_remover and xprotect_join could not be linked.

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_object_unref: assertion ‘object != NULL’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_object_unref: assertion ‘object != NULL’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_link_pads_full: assertion ‘GST_IS_ELEMENT (src)’ failed

0:00:00.014089314 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:203:gst_vpsjpegtranscoder_init: xprotect_join and encoder could not be linked.

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_link_pads_full: assertion ‘GST_IS_ELEMENT (dest)’ failed

0:00:00.014122593 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:208:gst_vpsjpegtranscoder_init: Encoder and header_inserter could not be linked.

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_get_static_pad: assertion ‘GST_IS_ELEMENT (element)’ failed

0:00:00.014161488 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:214:gst_vpsjpegtranscoder_init: Could not find ‘sink’ in ‘filter->decoder’

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_ghost_pad_new: assertion ‘GST_IS_PAD (target)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_add_pad: assertion ‘GST_IS_PAD (pad)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_object_unref: assertion ‘object != NULL’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_get_static_pad: assertion ‘GST_IS_ELEMENT (element)’ failed

0:00:00.014235343 3594 0x56236117ac30 ERROR vpsjpegtranscoder gstvpsjpegtranscoder.cpp:221:gst_vpsjpegtranscoder_init: Could not find ‘src’ in ‘filter->encoder’

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_ghost_pad_new: assertion ‘GST_IS_PAD (target)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_element_add_pad: assertion ‘GST_IS_PAD (pad)’ failed

(gst-inspect-1.0:3594): GStreamer-CRITICAL **: 10:26:55.701: gst_object_unref: assertion ‘object != NULL’ failed

Error 2:

0:00:00.013040973 3596 0x55d973b81d20 WARN GST_PLUGIN_LOADING gstplugin.c:792:_priv_gst_plugin_load_file_for_registry: module_open failed: /home/VpsSamples/VPService/bin/libgstvpsboundingboxes.so: undefined symbol: gst_buffer_add_onvif_meta

(gst-inspect-1.0:3596): GStreamer-WARNING **: 10:28:39.869: Failed to load plugin ‘/home/VpsSamples/VPService/bin/libgstvpsboundingboxes.so’: /home/VpsSamples/VPService/bin/libgstvpsboundingboxes.so: undefined symbol: gst_buffer_add_onvif_meta

Could not load plugin file: Opening module failed: /home/VpsSamples/VPService/bin/libgstvpsboundingboxes.so: undefined symbol: gst_buffer_add_onvif_meta

Error 3:

0:00:00.012959319 3570 0x558780988d20 WARN GST_PLUGIN_LOADING gstplugin.c:792:_priv_gst_plugin_load_file_for_registry: module_open failed: /home/VpsSamples/VPService/bin/libgstvpsxprotect.so: undefined symbol: _ZN12VpsUtilities15GenericByteData8SetCodecENS_5CodecE

(gst-inspect-1.0:3570): GStreamer-WARNING **: 10:03:23.850: Failed to load plugin ‘/home/VpsSamples/VPService/bin/libgstvpsxprotect.so’: /home/VpsSamples/VPService/bin/libgstvpsxprotect.so: undefined symbol: _ZN12VpsUtilities15GenericByteData8SetCodecENS_5CodecE

Could not load plugin file: Opening module failed: /home/VpsSamples/VPService/bin/libgstvpsxprotect.so: undefined symbol: _ZN12VpsUtilities15GenericByteData8SetCodecENS_5CodecE

On the top of my head it looks like trouble loading vpsxprotect plugin that has elements. Error 3 seems to be causing all others.

We’ll have a look in our environment and get back to you.

Can you try:

GST_PLUGIN_PATH=./ LD_PRELOAD=“./libgstvpsxprotect.so ./libgstvpsonvifmeta.so ./libgstvpsxprotectmeta.so ./libvpsutilities.so” gst-inspect-1.0 vpsxprotect

Also make sure in your makefile the libraries are in LD_PRELOAD.