Preview Server Administrator Guide
Version 4.6 | Published January 16, 2023 ©
Configuration
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), 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.
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 the Preview Server service’s behavior using the following settings in the PreviewServer.exe.config file available in the install location:
Setting |
Description |
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 declares 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. You can set a different time limit by modifying this setting, which specifies the maximum number of seconds to retain cached results. |
VizEngineCleanupIntervalMilliSeconds |
Once a scene in 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's 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 utilized by Preview Server. |
DebugMode |
Debug mode enables extended logging (for troubleshooting). |
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 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>
Setting Up HTTPS
-
To open the HTTPS port, run the following command once for each port you want to test: netsh http add urlacl url=https://+:4443/ user=YOURUSERNAME
-
You can change the https port by editing the .config file and changing the SecurePort value.
-
In addition, you must set the SSL certificate for each port with this command: netsh http add sslcert ipport=0.0.0.0:4443 certhash=HASH_WITHOUT_SPACES appid={81e86c2d-63c0-4841-b72c-2189604b4245}
To see if you have a hash that can be used for the command above, run one of the following commands:
certutil -store My
or
powershell -Command Get-ChildItem -path cert:\LocalMachine\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:
-
In Trio Configuration, navigate to the Connectivity > Viz One panel.
-
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:
-
In Trio Configuration, navigate to the User Interface > Page List/Playlist panel.
-
Enable the Use Preview Server to load thumbnails box.
For more details, see the Viz Trio User Guide.