v2.4

Version 2.4 of the script interface ships with the next release of Fast video cataloger.

IGUI.Refresh takes a new hint, "keywords", which rebuilds the keyword lists in the Search and Keywording windows from the catalog and nothing else. Those windows read the keyword list when the catalog is opened and are never told when it changes, so keyword names, colours and parents a script writes through SetVideoTagProperty or SetActorTagProperty did not show up in them; closing and reopening the Search window does not help, because it is a pane and is not rebuilt when it is shown again. Refresh("") has always covered this as part of refreshing everything, and still does - the new hint is the same rebuild without the video wall, attract mode and folder watcher restarting with it.

A new function IsValidPlaybackRate has been added to the IVideoPlayer interface. It checks if a value can be passed to SetPlaybackRate without throwing; a valid rate is a positive, finite number. Note that a valid rate can still be refused by the filter graph if the video format does not support playback at that speed.

Visual search reaches the script interface through SceneQuery: DescribeText ranks every indexed scene by a description in words, SimilarToThumbnailId ranks by likeness to a scene, MaxVisualResults caps the list (0 = 200), and MaxVisualResultsPerVideo caps what any one video contributes to it (0 = no limit). The scene a SimilarToThumbnailId search starts from is never among its results. ThumbnailEntry gains Score, the relevance a ranked result came back with, and SceneQueryResult gains VisualCandidates, how many scenes were scored before the cut. Push such a query with IGUI.SetQuery and the program encodes the description itself (it needs the Visual search model and the catalog's search index); calling SearchThumbnails directly works for SimilarToThumbnailId, while a DescribeText needs the QueryEmbedding only the program can produce. See the Find Scenes by Description sample.

The thumbnail time on ThumbnailEntry is FrameTimeS, in seconds. The reference page listed it as FrameTimeMS, which has not existed since the field was renamed and does not compile; the name in the sample project's service proxy was stale the same way, where it read as zero rather than failing. Both now say FrameTimeS. The catalog column keeps the old name and has always held seconds.

A new function ReadMetadata has been added to the IVideoIndexer interface. It queues a video in the catalog to have its metadata read from the file again, without capturing thumbnails - the same as Index > Re-read metadata in the program - so a script can bring the catalog up to date after the XMP or other metadata in a file has been edited elsewhere. Values that changed in the file are updated and keywords are added; nothing is cleared.

A new function TranscribeFromAudio has been added to the IVideoIndexer interface. It queues a video in the catalog to be transcribed from a separate audio file instead of its own audio - the same as choosing an audio file with Add in the transcript window - for sound recorded apart from the picture. The transcript is stored on the video and replaces any it had.

A new function GetActorEmbeddingsPage has been added to the IVideoCatalogService interface. It returns actor face embeddings a page at a time, taking the number to skip and the number to return. Use it instead of GetAllActorEmbeddings, which cannot be read at all against a running catalog server once a catalog holds a few hundred actors - the reply carries one attachment per embedding and the message format allows at most 1000. GetAllActorEmbeddings is unchanged and still there for existing scripts.