The Media Server SDK includes two example analytics plugins in the plugins_optional directory:
Sample Analytics Plugin: A simple plugin designed to verify that your system works.
Stub Analytics Plugin: A comprehensive plugin designed to test advanced SDK features.
Sample Analytics Plugin
The Sample Analytics Plugin is the simplest available plugin. It receives video frames from the Media Server, ignores their contents, and generates a "detected object" (a rectangle moving diagonally) on each frame.
Use this plugin to test whether your VMS plugin and analytics subsystems work, or as a starting point for developing simple plugins.
File locations
A pre-built version of the plugin comes with the server distribution.
Windows:
C:\Program Files\Network Optix\Nx Meta\MediaServer\plugins_optional\sample_analytics_plugin.dll
Linux:
/opt/networkoptix/mediaserver/bin/plugins_optional/libsample_analytics_plugin.so
NOTE: You can also build your own version from the SDK source files. The version built from the SDK links to nx_kit statically and has no external dynamic library dependencies. The pre-built version depends on the dynamic nx_kit library because it compiles as part of the main VMS project. |
Activate the Sample Analytics Plugin
Because the plugin resides in the plugins_optional directory, the Media Server does not load it by default. To activate the plugin, perform the following steps:
Move or copy the plugin file (
sample_analytics_plugin.dllon Windows orlibsample_analytics_plugin.soon Linux) from theplugins_optionaldirectory to thepluginsdirectory.Restart the Nx Meta Media Server.
Open Nx Meta Desktop, place a camera onto your layout, and verify that the video plays.
Right-click the camera video feed and select Camera Settings.
Click the Integrations tab, select Sample Analytics Plugin, and toggle the switch to On.
In the Notification Panel, click right icon to open the Objects tab.
Verify that the rectangle moves across the video and that corresponding object tiles appear in the right panel.
Use a custom-built Sample Analytics Plugin
To test a version of the plugin that you built yourself from the SDK, copy your custom binary to the plugins directory and follow the activation steps starting from step 3.
Important: Ensure that the pre-built plugin is not active in the plugins directory. The server cannot load two plugins that share the same plugin ID. To run both simultaneously, you must copy the source code, rename the plugin, and change the hard-coded ID and name values in its C++ manifest file. |
Troubleshooting with the sample plugin
If your custom plugin does not appear in the Plugins tab during development, activate the default Sample Analytics Plugin to isolate the issue. If the sample plugin works, compare its implementation against your custom project to find the root cause.
Stub Analytics Plugin
The Stub Analytics Plugin resides in the /stub_analytics_plugin directory. It utilizes almost all features available in the SDK. It does not analyze actual video data, but it generates various metadata types and offers extensive configuration options.
Use this plugin to test advanced SDK features or as a starting template for complex plugins by stripping out the features you do not need.
Activate the stub plugin
Because the plugin resides in the plugins_optional directory, the Media Server does not load it by default. To activate the plugin, perform the following steps:
Move or copy the plugin folder (
sample_analytics_plugin) from theplugins_optionaldirectory to thepluginsdirectory.Restart the Nx Meta Media Server.
Open Nx Meta Desktop, place a camera onto your layout, and verify that the video plays.
Right-click the camera video feed and select Camera Settings.
Click the Integrations tab, select the desired Stub Analytics type, and toggle the switch to On.
In the Notification Panel, click right icon to open the Objects tab.
Verify that the selected Analytics Type is applied to the video and that corresponding object tiles appear in the right panel.
Understand the stub settings
When you view the plugin in the Plugins tab of the Camera Settings dialog, you will see numerous device agent (camera-specific) settings. These options fall into two categories:
Real settings: Options that control plugin behavior, such as metadata generation types and frequency.
Example settings: Various dummy settings used exclusively to test the UI and settings framework itself.
Comments
0 comments
Article is closed for comments.