Skip to content

IScripting

Namespace: VideoCataloger

Type: Interface

Root of script interface to FVC. An object that implements this interface is passed to the run function.

Definition

public interface IScripting

Methods

Method Description
GetSelection() Get selection state object. This object is used to get the get and set the current selection int the video catalog.
GetConsole() Get the console interface used for printing text during script execution.
GetVideoCatalogService() Get the current video catalog interface. Note that this interface is implemented in another namespace "VideoCataloger.RemoteCatalogService"
GetGUI() Get the windows interface for controlling windows.
GetVideoIndexer() Get the video indexer interface.
GetUtilities() Get the utilities interface.
GetBrowser() Get the browser.
GetVideoPlayer() Get video player.
GetActionPipe() Get action pipe for actions started by another application.
GetFaceRecognition() Get the face recognition service used to detect faces in images and generate face embeddings.

GetSelection

Get selection state object. This object is used to get the get and set the current selection int the video catalog.

ISelection GetSelection()

Returns: VideoCataloger.ISelection - An object that implements the ISelection interface.


GetConsole

Get the console interface used for printing text during script execution.

IConsole GetConsole()

Returns: VideoCataloger.IConsole - An object that implements the IConsole interface.


GetVideoCatalogService

Get the current video catalog interface. Note that this interface is implemented in another namespace "VideoCataloger.RemoteCatalogService"

IVideoCatalogService GetVideoCatalogService()

Returns: VideoCataloger.RemoteCatalogService.IVideoCatalogService - An object that implements the IVideoCatalogService interface.


GetGUI

Get the windows interface for controlling windows.

IGUI GetGUI()

Returns: VideoCataloger.IGUI - An object that implements the IConsole interface.


GetVideoIndexer

Get the video indexer interface.

IVideoIndexer GetVideoIndexer()

Returns: VideoCataloger.IVideoIndexer - An object that implements the IVideoIndexer interface.


GetUtilities

Get the utilities interface.

IUtilities GetUtilities()

Returns: VideoCataloger.IUtilities - An object that implements the IUtilities interface.


GetBrowser

Get the browser.

ChromiumWebBrowser GetBrowser()

Returns: CefSharp.Wpf.ChromiumWebBrowser - An interface to the web browser.


GetVideoPlayer

Get video player.

IVideoPlayer GetVideoPlayer()

Returns: VideoCataloger.IVideoPlayer - An interface to the video player.


GetActionPipe

Get action pipe for actions started by another application.

IActionPipe GetActionPipe()

Returns: VideoCataloger.IActionPipe - An interface to the action pipe.


GetFaceRecognition

Get the face recognition service used to detect faces in images and generate face embeddings. The face engine is initialized on demand the first time this is called. Note that this interface is implemented in another namespace VideoCatalogService.FaceRecognition.

VideoCatalogService.FaceRecognition.IFaceRecognitionService GetFaceRecognition()

Returns: VideoCatalogService.FaceRecognition.IFaceRecognitionService - The face recognition service, or null if face recognition is not available (the AI face models have not been downloaded, see AI settings).

The returned service provides, among others:

  • DetectFacesWithEmbeddings(byte[] imageData, bool useCnn) - detect all faces in a JPEG image and generate an embedding for each.
  • DetectFaceCount(byte[] imageData, bool useCnn) - fast check for how many faces an image contains.
  • GenerateEmbeddingFromPortrait(byte[] imageData) - generate an embedding from a single-face portrait.
  • CalculateSimilarity(FaceEmbedding a, FaceEmbedding b) - similarity score between two embeddings (0.0-1.0).

Embeddings can be stored per actor with IVideoCatalogService.SaveActorFaceEmbedding and read back with GetAllActorEmbeddings. See the LearnActorFaces sample script for a complete example.