Skip to main content

Controlling VideoJet Monitor Group camera layouts in BVMS through Script

Possible causes and solution(s)

Overview

In complex BVMS installations with VideoJet decoders and large camera counts, operators often need to quickly switch predefined camera sets on a Video Wall based on operational scenarios (for example, different courtrooms, alarms, or external inputs).

This article explains:

  • Why Operator Client Favorites do not persist VideoJet Monitor Group camera assignments

  • What behavior is expected by design

  • How BVMS scripting can be used to dynamically control layouts, camera placement, and scenarios

  • How to assign specific cameras to specific panes on a VideoJet Monitor Group

System overview (scenario):

  • BVMS version: 12.3.x

  • VideoJet Decoders: VJD-7153 / VJD-7533

  • Monitor Group: Multi-monitor Video Wall (example: 4 monitors)

  • Operator Client used for daily operation

External inputs (e.g., Advantech I/O module) used as event triggers

Problem

Operators expect to:

  • Create multiple camera presets for a Video Wall

  • Save and recall these presets using Operator Client Favorites

  • Restore exact camera-to-pane assignments after restarting Operator Client

However, the following behavior is observed:

  • Favorites correctly restore camera panes in Operator Client

  • Favorites do not persist camera assignments on VideoJet Monitor Groups

  • After restarting Operator Client, the Monitor Group reloads its original configuration

  • Reloading a Favorite does not revert the VideoJet Monitor Group cameras to their previous positions

Expected Behavior

This behavior is expected in BVMS.

Key points:

  • VideoJet Monitor Groups are configured and persisted in BVMS Configuration Client

  • Operator Client Favorites do not store:

    • Decoder pane-to-camera mappings

    • VideoJet Monitor Group layouts as a matrix preset

  • Favorites only store:

    • Monitor Group assignment

    • Operator Client camera panes

As a result:

  • Any temporary camera changes made to a Monitor Group during live operation are lost after Operator Client restart

  • Monitor Group configuration always reloads from the Configuration Client

Solution

Recommended Solution: BVMS Scripting

To dynamically control VideoJet Monitor Groups, BVMS Client or Server Scripts must be used.

Scripting allows you to:

  • Change decoder layouts programmatically

  • Assign specific cameras to specific decoder panes

  • Trigger scenarios using:

    • Events

    • Alarms

    • External I/O inputs

    • Favorites (script execution)

This is currently the only supported method to achieve scenario-based VideoJet layouts.

Understanding Decoder Logical Numbers

A common source of confusion is the method:

GetDecoderByLogicalNumber()

Important clarification:

  • This does not refer only to the physical decoder device

  • It refers to decoder pane logical numbers

  • Logical numbering is sequential across monitors

Example:

  • Monitor 1 panes: 1–25

  • Monitor 2 panes: 26–50

  • Monitor 3 panes: 51–75

  • Monitor 4 panes: 76–100

Each logical number represents a specific pane position on the Video Wall.

Assigning Cameras to Specific Panes

To place cameras in exact positions:

  1. Identify the layout (e.g. 1x1, 2x2, 1+8, etc.)

  2. Identify the pane logical number where the camera should appear

  3. Assign the camera to that pane using scripting

If cameras were manually disconnected from panes, scripts must:

  • Explicitly set layout

  • Explicitly reassign all required cameras

Script Example:

[Scriptlet("c3d4f49f-77c8-4c05-8a97-ac46f98213d1")]
public void VideoSein_Server_MotionCam2(EventData e)
{
//Api.DecoderManager.DisplayCamera(Api.DecoderManager.GetDecoderByLogicalNumber(1),Api.CameraManager.GetCameraByLogicalNumber(2));
RemoteServerApi mida = new RemoteServerApi("127.0.0.1", "admin", "Admin123-!");
Decoder dec1 = mida.DecoderManager.GetDecoderByLogicalNumber(1);
//get the suported layout of the decoder

CODE
	IList<DisplayLayout> supportedDisplayLayouts = mida.DecoderManager.GetSupportedDisplayLayouts(dec1);

	bool setDisplayLayoutOK = false;

	foreach (var displayLayout in supportedDisplayLayouts)
	{
		//the description is equal to the Layout title one can see in ConfigClient-Devices-MonitorGroups -MG - right window where

		// under Layout are shown the icons and title of all supported Layouts for this particular MG (after decoder is connected to it)

		if (displayLayout.Description == "1x1, 5")

		{
			setDisplayLayoutOK = mida.DecoderManager.SetDisplayLayout(dec1, displayLayout);
			break;
		}
    		//set 2x2 layout for the decoder dec1
    		//
    }	
			mida.DecoderManager.DisplayCamera(mida.DecoderManager.GetDecoderByLogicalNumber(1),mida.CameraManager.GetCameraByLogicalNumber(3));
			mida.DecoderManager.DisplayCamera(mida.DecoderManager.GetDecoderByLogicalNumber(2),mida.CameraManager.GetCameraByLogicalNumber(2));
			mida.DecoderManager.DisplayCamera(mida.DecoderManager.GetDecoderByLogicalNumber(3),mida.CameraManager.GetCameraByLogicalNumber(4));
			mida.DecoderManager.DisplayCamera(mida.DecoderManager.GetDecoderByLogicalNumber(4),mida.CameraManager.GetCameraByLogicalNumber(5));
			mida.DecoderManager.DisplayCamera(mida.DecoderManager.GetDecoderByLogicalNumber(5),mida.CameraManager.GetCameraByLogicalNumber(6));
			mida.DecoderManager.DisplayCamera(mida.DecoderManager.GetDecoderByLogicalNumber(6),mida.CameraManager.GetCameraByLogicalNumber(3));	
	}
}

What Is and Is Not Possible

✅ Possible

  • Assign cameras to specific VideoJet panes

  • Change layouts dynamically

  • Trigger layouts via events, alarms, or scripts

  • Restrict script access via user permissions

❌ Not Possible

  • Save VideoJet Monitor Group layouts as Operator Client Favorites

  • Persist VideoJet pane assignments without scripting

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.