Polybench® Reference
Enables the replay of videos that are stored with the Video Storage.

Video Replay

Overview

Use this operator to replay video sequences in real-time, or at higher or lower speed.

Operator ports

Output Video out: Video frames

Properties

Find more information about changing properties here: "Properties Viewer"

Alias (stream name)
type: See description
The alias of the video file that is to be re-played. Example: 'Video' (max. 25 characters). The alias may contain variables and/or wildcards.

For more information about stream aliases, please refer to "Stream Alias - concept for naming of data files".
If you select a stream alias here, then AbsolutePath will become empty, because you use either a variable stream alias, or a fixed file path.

AbsolutePath
type: See description
The absolute path to the data file that is to be re-played (press the button to open a file).


LoopPlaying
type: True or False
Set to true to indicate that the video should re-start playing after its end has been reached.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


SyncRate
type: See description
Replay timing synchronization updates per second. The video that is being replayed runs at its own speed, but is synchronized to the Polybench timing at a rate determined by this property.


SyncID
type: See description
If you require the Video Replay to start or stop separately from other objects, you should refer to the Storage with a SyncID. This is a word or number you can think out yourself.


FileInformation
type: Undefined [this value cannot be changed]
Shows information about the file itself.


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: "Variable Parameters"

StreamAlias
type: See description
The alias of the data stream that is to be re-played. Example: 'ECG' (max. 25 characters). This is the same item as the Alias property.

For more information about stream aliases, please refer to "Stream Alias - concept for naming of data files".
If you select a stream alias here, then AbsolutePath will become empty, because you use either a variable stream alias, or a fixed file path.

StreamAliasSelect
type: Parameter list (see "Parameter List")
The alias of the data stream that is to be re-played. Use this parameter as address in a Drop-Down box.

If you select a stream alias here, then AbsolutePath will become empty, because you use either a variable stream alias, or a fixed file path.

AbsolutePath
type: See description
The absolute path to the data file that is to be re-played.


TimeOffset
type: See description
Number of seconds that the time of video frames should differ from other signals. This adds a negative or positive time offset to the video frames at the output, compared to other data sources.


FileCaption
type: See description
The caption or friendly name of the file. Sometimes this is equal to the path or file name. It depends on the file format if the file has a friendly name at all.


FileDate
type: See description
The date of the recording (or the file).

Some file formats explicitly record the file start date and time. In that case, this date is returned here.
If a file format does not record this information (for example a CSV file does not), then the date and time of the file as known to Windows is taken.

StartTime
type: See description
The time the recording was started, or the time the file was created.

Some file formats explicitly record the file start date and time. In that case, this time is returned here.
If a file format does not record this information (for example a CSV file does not), then the date and time of the file as known to Windows is taken.

FileLength
type: See description
The length of the current file in a time format.


FileLengthSeconds
type: See description
The length of the current file in seconds.


ChannelCount
type: See description
The number of signal channels in the current file.


FileType
type: See description
The type of the current file. Polybench automatically finds the correct file format of the file, which is indicated by this description.


FileName
type: See description
The name of the current file without extensions.


FileExtension
type: See description
The extension of the current file.


FileSecondExtension
type: See description
The second extension of the current file, if the file name has a double extension. Polybench commonly interprets the second extension of a file name as the 'alias', which is a identifier for the same kind of recordings (see "Stream Alias - concept for naming of data files").

Functions

Find more information about Functions here: "Operator Functions"

Pause
Pauses play back.

Continue
Continues play back after calling the Pause function.

Details

The Video Replay operator is typically used in applications that do post-processing of video data. The Video Replay is able to re-play video files at their original speed or - with limitations - at a higher or lower speed.

The Video Replay is also able to provide video reviewers with stored video frames, like the Video Storage operator ("Video Storage") can do. This means that you can connect a live video viewer as well as a stored video reviewer at the same output. Note that if you intend to do video frame reviews, that you should not start the Video Replay, otherwise the video will be played (also in a video reviewer).

A video file can be replayed at another rate as it was originally stored. To change the replay speed (make it play slower or faster), change the Speed setting in the Polybench designer (see the Play/Stop bar on top of the screen) or use the SPEED action ("SPEED"). The video itself will also be played in its original speed, so if you change the play speed in Polybench, the video replay will not be as smooth as at 100% play speed. Use the SyncRate property to adjust time synchronization updates.

Video Replay can halted and continued shortly by using the Pause and Continue functions. Use the FUNCTION action to control those functions.

How to specify the file to replay

The Video Replay can play videos from a file that is specified with an absolute path to a disk location, or it can play a video file by using a Stream Alias ("Stream Alias - concept for naming of data files") that is recognized by the Data Manager. The first method is more appropriate for demo purposes, the second is the prefered choice for post-processing applications.

Which video formats the Video Replay operator is able to replay, depends on the file interpreters that are installed on your Polybench system. The Video Replay does not suggest any file types. If you select a file, then the Video Replay tries to interpret the file using all the installed file interpreters. If that fails, the Video Replay shows nothing at its output or a warning pops up if you try to play the file.

Load a video at start-up of Polybench

It is possible to load a video file into the Video Replay immediately after an application is started up. For this functionality, you should specify in AbsolutePath a global variable that is set by an argument of Polybench.exe. Here are the steps to follow:

- make an application that uses a Video Replay.
- in the Video Replay property 'AbsolutePath' specify a global variable, for example the reserved variable $data$ (see also "Polybench Designer").
- Save the project and close Polybench.
- Now open Polybench.exe with at least two arguments: one to open the project and one to specify the file in $data$. You can do this in a batch file, if you like, or you can also do this in the Data Manager, by specifying the project in the Application Start-up dialog ("Application Start Buttons"). In that case the project is specified automatically.

In a batchfile, the start command could look like this:
Polybench.exe /program:"C:\Apps\My Replay Test App.xmc" /data:"C:\Data\MyRecording1.csv".

Now, the $data$ variable contains the path "C:\Data\MyRecording1.csv". The File Replay replaces the $data$ variable with its value, so that the AbsolutePath property now contains this path - the file is loaded!