Semantically search through a video
Search lets you locate exact moments across thousands of hours of video using natural language or an image reference. Results are split into three specialized buckets—embeddings, transcript, and ocr— So you can quickly see why something matched.
The path to use search:
To search with natural language:
Where num_args
are the max number of results returned and is optional.
To search with an image:
If both an image
and query
are supplied, the image will take precedence.
Using a Subindex will isolate a search a subset of the videos in an index. To use it:
where the subindex
is a list of video IDs to search within.
Search returns a list of match objects. The match object schema is:
Moonshine-assigned file_id
e.g. FHXYU838JHDWK.mp4
Workflows are in a private beta. Please contact us at team@usemoonshine.com to request access.
.run(flow='core/search', ...) params
Name/ID of the parent index to search.
Natural-language text.
Ignored if image
is supplied.
Local file path or public URL to an image used as the search reference.
An optional list of file_id
to narrow the search scope.
Max results per result-type bucket.