This section covers the following topics:

Preview Server Service

Preview Server is a Windows Service that sets up an HTTP REST service on port 21098 on the host on which it is running. This service accepts requests for graphical snapshots of playout elements from a Viz Engine.

Viz Engines

Although Preview Server can run on the same machine as a Viz Engine (also used for the data element preview in Viz Pilot’s newsroom client) and Media Sequencer to which this Viz Engine is attached, it is also possible to specify additional pairs of Media Sequencer and attached Viz Engine in order to spread the load. Frame requests are balanced across available Viz Engines in a way that minimize the memory load of each engine. The pool of Viz Engines is configured in the Web Interface Home page.

Note: Scaling of the system should be monitored to avoid excessive client waiting time and any potential overload of the Viz Engines.

Service Configuration

You can modify Preview Server’s service behavior using the settings in the appsettings.json file, available in ProgramData directory (c:\ProgramData\vizrt\Preview Server\ by default).

Settings in appsettings.json file are divided into 2 groups:

  • Actual service settings are coming under the Settings key:

Setting

Description

CorsAllowedOrigin

This setting can be used to restrict the allowed cross-origin resource sharing pattern utilized by Preview Server.

ServicePort

The service port setting lets you change the port number for regular HTTP requests for the Preview Server service. The service does not accept any HTTP requests if 0 is specified.

SecurePort

The secure port setting lets you change the port number for secure HTTPS requests for the Preview Server service. The service does not accept any HTTPS requests if 0 is specified.

Redraws

This number specifies how many redraws a renderer must perform before taking a snapshot of the graphic.

Note:  Although increasing the redraw number slows down the overall performance of snapshot requests, it might be required for some scenes, for example when using data pool plugins to render correctly.

ExternalBaseUrl

Changes the default URL base for snapshot requests, for example. This setting also overrides any Host, X-Forwarded-Proto and X-Forwarded-Port headers in requests. An empty string uses the default URL base and enables recognition of such headers in requests.

AlwaysRunPreviewScript

If set to True running OnPreview script hooks in the scene before taking a snapshot is enabled. Note that this might delay snapshot requests for scenes containing such hooks.

OpenIdConnectServerUrl

The URL to the OpenId Connect server that is trusted to handle user authentication. When this is set, all REST communication with the server must include an Authorization HTTP header value with a valid bearer token signed by this OpenId Connect server.

ValidAudience

When OpenIdConnectServerUrl is set, the bearer token must contain this value in its list of valid audiences. Leave empty to allow any authenticated audience.

AdministrationFromLocalhostOnly

If set to True this setting locks down the administration REST APIs (including documentation and web pages) so they can only be used from the machine on which this server is running. This is set to true by default.

LogLevel

This setting can be used to specify the verbosity of logs produced by Preview Server. Possible values are:

  • Debug: A debug log message is used for writing messages that are generally very uninteresting for the end user but may be useful for debug purposes.

  • Info: An Info log message is used for writing general messages describing what Preview Server is doing at the moment.

  • Warning: A Warning log message is used for irregular situations that may cause unexpected results.

  • Error: An Error log message is used for serious errors that are unexpected, and may cause situations with unwanted results.

Set to Warning by default.

ThumbPrint

Allows users to specify which certificate to use, to handle HTTPS connection. See Setting Up HTTPS for more details

PreviewServerLegacyPort

Specifies the legacy communication port used by Preview Server for backward compatibility with old clients. The default value is 54000. Modification of this setting won’t change anything, and Preview Server still uses port 54000 for backward compatibility. Provided in options for clarity.

  • List of Media Sequencer attached to this instance of Preview Server is coming under the Sequencers key. Even though this field can be modified manually in the configuration file, it is highly recommended to configure this part of Preview Server using the Web Interface Home page.

The following is an example of a configuration file (appsettings.json):

{
"Settings": {
"CorsAllowedOrigin": "*",
"ServicePort": 21098,
"SecurePort": 4443,
"PreviewServerLegacyPort": 54000,
"ExternalBaseUrl": "",
"OpenIdConnectServerUrl": "",
"ValidAudience": "api.vizrt.com",
"Redraws": 0,
"AlwaysRunPreviewScript": false,
"AdministrationFromLocalhostOnly": true,
"ThumbPrint": "",
"LogLevel": "Warning"
},
"Sequencers": {
"List": [
"http://localhost:8580/"
]
}
}

Setting Up HTTPS

  • The certificate must be installed in the LocalMachine\My store with the private key.

  • Once installed, the certificate thumbprint must be added to the Preview Server configuration file (Thumbprint option).

  • If both Thumbprint and SecurePort are provided, Preview Server service automatically opens the HTTPS port upon restart using the options provided.

Certificate’s thumbprint on Windows can be found by running the following command in PowerShell Get-ChildItem -Path Cert:\LocalMachine\My, or in cmd certutil -store My.

Viz Pilot Data Server

To grant applications connected to the Viz Pilot database access to Preview Server, see the Pilot Data Server Administrator Guide.

Configuring Preview Server Settings in Viz Trio

If Preview Server is used together with Viz Trio, some Preview Server settings must be defined in Viz Trio:

  1. In Trio Configuration, navigate to the Connectivity > Viz One panel.

  2. Enter the hostname and port number in the Preview Server Host box (format hostname:port).
    This enables snapshots of graphics to be displayed as video overlays in Viz Trio’s Timeline editor.

To enable the Preview Server to load actual thumbnails in the playlist, rather than displaying the default template thumbnails throughout, perform the following steps:

  1. In Trio Configuration, navigate to the User Interface > Page List/Playlist panel.

  2. Enable the Use Preview Server to load thumbnails box.

For more details, see the Viz Trio User Guide.