Learn to construct Video Walls and configure preset layouts using the MXNet API and Mentor GUI.
KNOWLEDGE BASE ARTICLE
How To: Build Video Walls and Layouts Using MXNet
Item | Details |
Product | MXNet (AVPro Edge) with the Mentor web GUI |
Topic | Creating a video wall, defining layouts, and switching layouts using the Mentor GUI or the vwid API commands |
Original author | Kevin Wang ([email protected]) |
Source material | Presentation dated 5-17-2021 |
Overview
This article explains how to build a video wall on an MXNet system and create layouts for it. It covers two methods: entering vwid API commands, and using the Video Wall tab in the Mentor web GUI. It also shows how to use Mentor to learn the API: build a configuration in the GUI, then read it back with an API command to see how each setting maps to a parameter.
The worked example uses a physical video wall of four displays (2×2) and a virtual layout that uses two of them (1×2). A single source is spread across the two displays, side by side.
Figure 1. The physical video wall (2×2) and the virtual layout (1×2) used in this article
Example values used in this article
Item | API example (Part 1) | Mentor example (Parts 2 and 3) |
Video wall name | COVEMOON | 2by1 |
Layout name | tab | layout1 and layout2 |
Source (encoder, tx) | SKY2 | 20845AA058C2 and SKY2 |
Displays (decoders, rx) | VW01, VW02 | VW01, VW02 |
Note: Replace the example names with the names used on your system. Wherever a command shows a name in curly braces, such as {videowall_name}, substitute your own value without the braces.
Part 1: Create a 1×2 video wall layout with API commands
Run these commands in a terminal session connected to the MXNet system. The examples in this article were run from PuTTY. Every command starts with vwid. A successful command returns "info":"OK","code":0.
Step 1: Create the physical video wall
Create the video wall and set the size of the physical wall (rows and columns of displays). In this example the physical wall is 2×2.
vwid add {videowall_name} {row column}
vwid add COVEMOON 2 2
Step 2: Add a layout
Add a named layout to the video wall.
vwid layout add {videowall_name} {layout_name}
vwid layout add COVEMOON tab
Step 3: Set the layout size
Set the number of rows and columns of the virtual layout. This example uses 1 row and 2 columns.
vwid layout setrowcol {videowall_name} {layout_name} {row column}
vwid layout setrowcol COVEMOON tab 1 2
To confirm, list the layout. The empty layout array shows that no displays have been assigned yet.
vwid layout list COVEMOON
{"cmd":"vwid layout list COVEMOON","info":{"tab":{"cols":2,"rows":1,"layout":[]}},"code":0}
Step 4: Assign sources and displays to the layout
Use vwid layout set to define what each display shows. The command takes one entry per display, and the entries are separated by a space. Enter the whole command on one line.
vwid layout set {videowall_name} {layout_name} row:col:tx:rx:vwrows:vwcols:vwrow:vwcol:rotate:stretch:vw:ow:vh:oh row:col:tx:rx:vwrows:vwcols:vwrow:vwcol:rotate:stretch:vw:ow:vh:oh ...
Each entry has 14 colon-separated values:
row:col:tx:rx:vwrows:vwcols:vwrow:vwcol:rotate:stretch:vw:ow:vh:oh
Parameter | Description | VW01 value | VW02 value |
row | Row position of the display in the physical video wall. In the 2×2 example, both VW01 and VW02 are in row 1. | 1 | 1 |
col | Column position of the display in the physical video wall. VW01 is in column 1 and VW02 is in column 2. | 1 | 2 |
tx | The source (encoder) to show. | SKY2 | SKY2 |
rx | The display (decoder) that receives the source. | VW01 | VW02 |
vwrows | Total number of rows in the video wall layout. A 1×2 layout has 1 row. | 1 | 1 |
vwcols | Total number of columns in the video wall layout. A 1×2 layout has 2 columns. | 2 | 2 |
vwrow | Row position of the display within the video wall layout. | 1 | 1 |
vwcol | Column position of the display within the video wall layout. | 1 | 2 |
rotate | Rotation of the image: 0, 180, or 270. A value of 180 rotates the display by 180 degrees. 0 means no rotation. | 0 | 0 |
stretch | 1 keeps the aspect ratio of the source content, so some content may be lost (cropped). 2 stretches the content to fill the full screen. | 2 | 2 |
vw | Visible width of the display, in mm. | 1 | 1 |
ow | Outer width of the display, in mm. | 1 | 1 |
vh | Visible height of the display, in mm. | 1 | 1 |
oh | Outer height of the display, in mm. | 1 | 1 |
The defaults for vw:ow:vh:oh are 1:1:1:1.
Putting the values together for this example (rotate 0, stretch 2, default measurements):
vwid layout set COVEMOON tab 1:1:SKY2:VW01:1:2:1:1:0:2:1:1:1:1 1:2:SKY2:VW02:1:2:1:2:0:2:1:1:1:1
{"cmd":"vwid layout set COVEMOON tab 1:1:SKY2:VW01:1:2:1:1:0:2:1:1:1:1 1:2:SKY2:VW02:1:2:1:2:0:2:1:1:1:1","info":"OK","code":0}
Example with rotation and display measurements. This version rotates both displays 180 degrees, keeps the source aspect ratio (stretch 1), and sets measurements of 958 mm visible width, 960 mm outer width, 540 mm visible height, and 538 mm outer height:
vwid layout set COVEMOON tab 1:1:SKY2:VW01:1:2:1:1:180:1:958:960:540:538 1:2:SKY2:VW02:1:2:1:2:180:1:958:960:540:538
Step 5: Activate the layout
Activate the layout so the video wall displays it.
vwid layout active COVEMOON tab
{"cmd":"vwid layout active COVEMOON tab","info":"OK","code":0}
Step 6 (optional): Turn the on-screen display off or on
vwid layout osd COVEMOON tab off
{"cmd":"vwid layout osd COVEMOON tab off","info":"OK","code":0}
vwid layout osd COVEMOON tab on
{"cmd":"vwid layout osd COVEMOON tab on","info":"OK","code":0}
Part 2: Create the same video wall with the Mentor GUI
Mentor builds a video wall from the same settings the API uses. This section creates a 1×2 video wall named 2by1 with two layouts: layout1, where the source fills the screen (stretch mode 2), and layout2, where the source is cropped to keep its original aspect ratio (stretch mode 1).
Step 1: Add the video wall
1. In Mentor, open the Video Wall tab.
2. In the VideoWall List dropdown menu on the right, select ADD VW.
3. In the Create Videowall Array window, enter the VideoWall Name (2by1), the number of Rows (1) and Cols (2), and the Layout Name (layout1).
4. Select Save VideoWall Array.
Figure 2. The Video Wall tab in Mentor
Figure 3. The Create Videowall Array window
Step 2: Assign the encoder and decoders
1. Drag and drop the encoder from the Encoders List onto each display (monitor).
2. Drag and drop each decoder from the Decoders List onto the corresponding display (monitor).
Figure 4. Dragging the encoder and decoders onto the displays
Step 3: Combine the displays and generate the video wall
1. Left-click monitor 1, then monitor 2.
2. Select the COMBINE button.
3. Select the Generate VIDEO WALL button to activate the video wall layout.
Figure 5. Combine the displays, then generate the video wall
Step 4: Create the layouts
Create the layouts from the Presets panel on the right side of the Video Wall tab. The panel lists the layouts for the video wall (here, layout1 and layout2) and provides ADD LAYOUT, COPY TO, and DEL LAYOUT buttons. Set the Aspect Ratio for each display in a layout:
• layout1: the source fills the full screen (Stretch Mode 2, shown as fullscreen).
• layout2: the source is cropped to maintain its original aspect ratio (Stretch Mode 1).
Figure 6. Mentor showing the layout1 and layout2 layouts in the Presets panel
Part 3: Read the Mentor configuration back with the API
After you build a configuration in Mentor, you can list it with the API to see the exact command that would create it. This is a quick way to understand what each parameter does. Run vwid list in your terminal session to see the video wall and its layouts.
For the Mentor example above, the layouts correspond to these commands:
vwid layout set 2by1 layout1 1:1:20845AA058C2:VW01:1:2:1:1:0:2:1:1:1:1 1:2:20845AA058C2:VW02:1:2:1:2:0:2:1:1:1:1
vwid layout set 2by1 layout2 1:1:SKY2:VW01:1:2:1:1:0:1:1:1:1:1 1:2:SKY2:VW02:1:2:1:2:0:1:1:1:1:1
| layout1 | layout2 |
Source (tx) | 20845AA058C2 | SKY2 |
Stretch mode | 2 (fill the full screen) | 1 (keep source aspect ratio) |
Displays (rx) | VW01, VW02 | VW01, VW02 |
Rotation | 0 | 0 |
Figure 7. The vwid list output in a PuTTY session
Tip: If a command is not recognized, the system returns an error with "code":-1 instead of "code":0. Check that the command starts with vwid and that the video wall and layout names exist.
Part 4: Switch layouts with API commands
To switch the video wall between layouts, activate the layout you want. Use vwid layout active {videowall_name} {layout_name}.
vwid layout active 2by1 layout1
{"cmd":"vwid layout active 2by1 layout1","info":"OK","code":0}
vwid layout active 2by1 layout2
{"cmd":"vwid layout active 2by1 layout2","info":"OK","code":0}
Command quick reference
Command | Purpose |
vwid add {videowall_name} {row column} | Create a video wall and set the physical wall size. |
vwid layout add {videowall_name} {layout_name} | Add a layout to a video wall. |
vwid layout setrowcol {videowall_name} {layout_name} {row column} | Set the rows and columns of a layout. |
vwid layout set {videowall_name} {layout_name} {entries} | Assign sources and displays to a layout (one entry per display). |
vwid layout list {videowall_name} | List the layouts of a video wall. |
vwid list | List the video walls and their layouts. |
vwid layout active {videowall_name} {layout_name} | Activate (switch to) a layout. |
vwid layout osd {videowall_name} {layout_name} on|off | Turn the on-screen display on or off for a layout. |
📎 Attachments (1)