02. VIDEO SETUP
HAL Video Setup
HAL stands for Hardware Abstraction Layer. It is a common interface to video I/Os for Chyron products (PRIME, ...).
HAL can support different manufacturer boards (called Interface). The inputs and outputs are configured through an Xml file.
Driver installation
Download and install Matrox drivers Matrox/HAL_driver_10.3.101
To register HAL for Matrox, open a CommandPrompt, or Bash in Admin Mode. Navigate to your Prime VSAR distribution, and then get into directory:
> cd…“C:\Program Files\Chyron\PRIME_VSAR-x.x.x.x\Engine\Plugins\Chyronhego\Mithril\ThirdParty \Hal\lib\x64”
Then enter the command:
> regsvr32 MvIOHAL.dll
If for some reason you need to unregister the dll, run:
> regsvr32.exe -u MvIOHAL.dll
Matrox Board Connections
This document describes the different possible connections of Matrix boards.
for LE5:
HAL Interfaces Configuration
Open the base configuration file <InstallationDirectory>Engine/Plugins/Chyronhego/Mithril/Config/BaseMithril.ini, you can then activate and deactivate interfaces by changing the lines:
[/Script/HalMedia.Hal]
bInterfaceMatroxEnabled=true
bInterfaceDeltacastEnabled=false
Note that interfaces are evaluated in the upper order. This means that in the Xml configuration file, the first board will be a Matrox board (if any), and then a Deltacast board (if any).
Note that the Deltacast interface is not designed for production.
HAL.xml: Video I/O Streams Configuration
Video Streams are configured in the xml file: %LOCALAPPDATA%/Chyronhego/Fresh/HAL.xml.
Hal.xml configuration file is loaded when PRIME VSAR starts; it allows configuring the genlock, inputs and outputs of the different video boards present on the machine. So whenever you edit this file, you need to restart PRIME VSAR.
⚠️When you change video format in Hal.xml from 25/50 fps to 29.97 VSAR needs to be restarted twice, in order for the change to take effect on the Matrox. This is a known issue.
Syntax
<halconfig>
<board>
<genlock standard="XXX" source="XXX" input="0"/>
<output standard="XXX" enabled="true" haskey="false" hphase=”0” vphase=”0” fifo="3" 4k2si=”false” tcpcesium="false" cesiumip="127.0.0.1" cesiumport="22222">
<output/> ...
<input standard="XXX" enabled="true" haskey="false" fifo="3" timeout="50" “useassync”=”false”>
<input/> ...
</board>
<board> ... </board>
</halconfig>
Available types
- Available standards for <genlock> <output> and <input> tags are:
- S259M_NTSC,
- S259M_PAL,
- S274M_1080i_59,
- S274M_1080i_60,
- S274M_1080i_50,
- S274M_1080p_59,
- S274M_1080p_60,
- S274M_1080p_50,
- S274M_1080p_29,
- S274M_1080p_30,
- S274M_1080p_25,
- S296M_720p_50,
- S296M_720p_59,
- S296M_720p_60,
- S4K_2160p_25,
- S4K_2160p_29,
- S4K_2160p_30,
- S4K_2160p_50,
- S4K_2160p_59,
- S4K_2160p_60,
- SFILM_720p_23,
- SFILM_720p_24,
- SFILM_1080p_23,
- SFILM_1080p_24,
- SFILM_2160p_23,
- SFILM_2160p_24
- Boolean values accept “true|1” and “false|0”
- Note: formats in red have known issues and may not work properly
<genlock>
Available genlock source are: internal|analog|input.
- In internal mode, the board is not genlocked to an external signal.
- In analog mode, the genlock is received on the dedicated Sync BNC.
- In input mode, the genlock is taken from the SDI video input. Input attribute is only relevant when source is set to input.
<output>
If enabled is set to “false” the output will be disabled. Using this you can configure eg.: that the 1st connector is disabled and that you want to use 2. connector only.
If haskey is true, the output will be set in Fill+Key; if set to false, the output will be Fill only. Note that if haskey is enabled. As key is generated, it will be generated automatically into another output connector.
⚠️ when haskey=false there is color conversion in place that can result in worse chrominance resolution, for the highest resolution we recommend to use haskey=true
fifo is the number of frames buffered on the video device; there are two working modes:
- FIFO Mode: In fifo mode, frames computed by VSAR are pushed on the output connector; there can’t be more than fifo buffers on the output queue. Setting a value of minimum 2 is required, 3 is recommended. In this mode, VSAR cannot guarantee that Cesium data will be properly in sync with the real camera.
- Delay Mode: In Delay mode, a fixed delay is guaranteed between a given input on the Matrox board, and a given output. For example, 6 frames can be guaranteed between SDI input 0 and output 2. To use this mode. You need to select an input as the ‘reference delay’ input (see useassync in <input> below).
hphase and vphase set the video phase of each output separately (they can be edited in the GUI, but they are currently not reported in the xml file).
If 4k2si is true then the 4K signal is transmitted in 2 sample interleave format; otherwise four quadrant splits are used. Note: this feature may not work on some Matrox cards, use mvConnectorConfig (see below) to configure 2SI.
If tcpcesium is true then tcp messages will be sent to cesium to genlock the UdpGenlock Cesium drivers. This value is usually set to false in standard operation. cesiumip and cesiumport allow you to set the Cesium you want to send sync messages to.
If HDR is true the camera rendering is done in larger color resolution (16f) and then send using packed 10b signal (YCrCb_422_10b) to output
Valid Output arguments:
- standard - Standard string example: standard="S274M_1080i_59"
- haskey - Boolean example: haskey="true"
- enabled - Boolean example: enabled="true"
- fifo - Integer example: fifo=”3”
- hphase - Integer example: hphase=”0”
- vphase - Integer example: vphase=”0”
- tcpcesium - Boolean example: tcpcesium="true"
- cesiumip - IP string example: cesiumip="127.0.0.1"
- cesiumport - Port string example: cesiumport="4300"
- 4k2si - Boolean example: 4k2si="true"
- hdr - Boolean example: hdr="true"
<input>
Input has the same attributes as output.
timeout is the duration (in ms) after which a video source is considered missing.
useassync is a boolean used to select an input source as the ‘Delay mode’ reference. If several inputs have the tag useassync set to true, then only the last one is considered as the sync source.
⚠️ When using useassync, VSAR main thread is “locked” to the input, meaning that when input is not available VSAR can get stuck.
⚠️When using useassync input in MediaPlayer it is possible on close of the source that output may drop up-to 2 frames, we recommend in production to keep it either opened or closed.
Valid Input arguments:
- standard - Standard string example: standard="S274M_1080i_59"
- haskey - Boolean example: haskey="true"
- enabled - Boolean example: enabled="true"
- fifo - Intiger example: fifo=”3”
- timeout - Intiger example: timeout="50"
- useassync - Boolean example: useassync="true"
Notes/Troubleshooting:
- When a new "output" (resp. "input") is parsed the previously parsed output (resp. "input") is copied to the new one. This allows the user not to copy all the attributes on each line.
- This is also true for the "standard" attribute of genlock, which will be copied to the next input and output lines.
- The tcpcesium is reset to false when a new output is built.
- For Matrox, if you change the framerate (eg: 50->59, or 59->60) then you may have to restart twice PRIME VSAR before it’s taken into account.
- For Matrox, it seems that changing haskey needs a reboot. In fact haskey=”true” -> haskey=”false” seems to work, but the other way seems very challenging. The same applies for 4K outputs.
- If you have more <output> or <input> declared in the xml file than the actual hardware has, they are silently ignored. Thus it’s harmless to leave extra <output> or <input> lines.
Delay Mode Notes:
In Delay mode, you need to have set at least one input with “useassync”=”true” (see Example4 below). This input is called ‘delay reference input’.
- If an input has the “useassync” tag set, all the outputs will be considered as configured in “Delay Mode”, thus their fifo attribute will silently be set to 0.
- You need to have the genlock in sync with the ‘delay reference input’. If you use “source”=”analog” then the analog genlock should be in sync with the ‘delay reference input’. Alternatively, you can set “source”=”input” “input”=”XX” where XX is the index of the ‘delay reference input’, starting at 0 (the first input has index 0, the second index 1, and so on).
To tune the delay between the output and the ‘delay reference input’, get in VSAR Control Panel > Video Output > Outputs > Frame Delay. Frame delay is set independently for each output. The default is 6.
Matrox I/O reconfiguration
If you need to reconfigure the number of video inputs and outputs: open a command prompt with Admin rights:
> cd “C:\Program Files\Matrox DSX-TopologyUtils\drivers”
To get the list of commands (optional)
> mvConnectorConfig.exe -help
To get the Matrox Card Serial Number
> mvConnectorConfig.exe list
To display the card’s current configuration
> mvConnectorConfig.exe -ShowCurrent -sn=<Matrox Card Serial Number>
To re-affect the number of video inputs and outputs (x and y values respectively)
> mvConnectorConfig.exe -<x>in<y>out -sn=<Matrox Card Serial Number>
The last command takes a while to execute, then you have to reboot the machine.