Preview Server Administrator Guide

Version 4.3 | Published June 26, 2019 ©

Configuration

This section covers the following topics:

Preview Server Service

The 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 the 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), it is also possible to specify additional Viz Engines in order to spread the load. Frame requests will be balanced across available Viz engines in a way that will minimize the memory load of each engine.

The pool of Viz Engines is configured in the Preview Server Web Interface Home page.

Scaling of the system should be monitored to avoid excessive client waiting time and any potential overload of the Viz Engine(s).

Service Configuration

You can modify the Preview Server service’s behavior using the following settings in the PreviewServer.exe.config file available in the install location.

VizEnginePollIntervalMilliSeconds

This setting determines how often a render engine’s availability is checked.

VizEngineTimeoutMilliSeconds

After the specified amount of milliseconds, the render engine list stops attempting to obtain the availability status and declare the engine unresponsive.

CacheMaxAge

Frames are cached in memory, allowing quicker responses when requesting frames that have been requested previously. By default, frames are cached for a maximum of one day. This can be changed by modifying this setting, which specifies the maximum number of seconds to retain cached results.

VizEngineCleanupIntervalMilliSeconds

Once a scene in the Graphic Hub is modified, all cached snapshots using that scene must be evicted from the cache. This interval specifies how often the scene modification dates are checked to detect scene changes.

UseRunLengthEncoding

It is recommended to activate run length encoding if relatively high-resolution snapshots are requested.

CorsAllowedOrigin

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

DebugMode

Debug mode enables extended logging for troubleshooting.

ServicePort

The service port setting enables changing the port number for regular HTTP requests of the Preview Server service. The service does not accept any HTTP requests if 0 is specified.

SecurePort

The secure port setting allows changing the port number for secure HTTPS requests of 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 has to perform before taking a snapshot of the graphic. Note that increasing this number slows down the overall performance of snapshot requests but it might be required for some scenes, for example using data pool plugins to render correctly.

ExternalBaseUrl

Changes the default URL base for e.g. snapshot requests. This setting will also override possible 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 it will enable running OnPreview script hooks in the scene before taking a snapshot. 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 will lock down the administration REST APIs (including documentation and web pages) so that they can only be used from the machine on which this server is running. This is set to true by default.

The following is an example of a Configuration Section:

<configuration>
<applicationSettings>
<Vizrt.Frames.Properties.Settings>
<setting name="VizEnginePollIntervalMilliSeconds" serializeAs="String">
<value>5000</value>
</setting>
<setting name="VizEngineTimeoutMilliSeconds" serializeAs="String">
<value>1000</value>
</setting>
<setting name="CacheMaxAge" serializeAs="String">
<value>86400</value>
</setting>
<setting name="VizEngineCleanupIntervalMilliSeconds" serializeAs="String">
<value>60000</value>
</setting>
<setting name="UseRunLengthEncoding" serializeAs="String">
<value>False</value>
</setting>
<setting name="CorsAllowedOrigin" serializeAs="String">
<value>*</value>
</setting>
<setting name="DebugMode" serializeAs="String">
<value>False</value>
</setting>
<setting name="ServicePort" serializeAs="String">
<value>21098</value>
</setting>
<setting name="SecurePort" serializeAs="String">
<value>4443</value>
</setting>
<setting name="Redraws" serializeAs="String">
<value>0</value>
</setting>
<setting name="ExternalBaseUrl" serializeAs="String">
<value />
</setting>
<setting name="AlwaysRunPreviewScript" serializeAs="String">
<value>False</value>
</setting>
<setting name="OpenIdConnectServerUrl" serializeAs="String">
<value>https://ourstory.vizrt.internal:7500/</value>
</setting>
<setting name="ValidAudience" serializeAs="String">
<value>api.vizrt.com</value>
</setting>
<setting name="AdministrationFromLocalhostOnly" serializeAs="String">
<value>True</value>
</setting>
</Vizrt.Frames.Properties.Settings>
</applicationSettings>
</configuration>

Viz Pilot Data Server

For details on how to grant access to the Preview Server for all applications connected to the Viz Pilot database, see the Pilot Data Server Administrator Guide.

Configuring Preview Server Settings in Viz Trio

If the 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.