---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

1.  [](/)
2.  [Code examples](/recipes)
3.  Video Semantic Search Pipeline

Back to code examples

Similar

# Video Semantic Search Pipeline

Build a production-ready video search engine that lets users find specific moments across thousands of hours of video using natural language queries.

video

text

Multi-Tier

[Run in Builder](/build?recipe=video-semantic-search)

Python

cURL

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="video-search")

\# 1. A bucket for the videos, and one collection that splits them into scenes with a visual and a transcript embedding each

bucket \= client.buckets.create(

    bucket\_name\="videos",

    bucket\_schema\={

        "properties": {

            "video": {

                "type": "video",

            },

        },

    },

)

collection \= client.collections.create(

    collection\_name\="videos",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "multimodal\_extractor",

        "version": "v1",

        "parameters": {

            "split\_method": "scene",

            "run\_transcription": True,

            "run\_transcription\_embedding": True,

        },

    },

)

\# 2. Upload and process

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "video", "type": "video", "data": "s3://your-bucket/videos/keynote.mp4"}\],

)

client.collections.trigger(collection\["collection\_id"\])

\# 3. Visual and transcript search fused with RRF, then a cross-encoder rerank

retriever \= client.retrievers.create(

    retriever\_name\="video-search",

    collection\_identifiers\=\["videos"\],

    input\_schema\={

        "query": {

            "type": "text",

            "required": True,

        },

    },

    stages\=\[

        {

            "stage\_name": "search",

            "stage\_id": "feature\_search",

            "parameters": {

                "searches": \[

                    {

                        "feature\_uri": "mixpeek://multimodal\_extractor@v1/vertex\_multimodal\_embedding",

                        "query": {

                            "input\_mode": "text",

                            "value": "{{INPUT.query}}",

                        },

                        "top\_k": 50,

                    },

                    {

                        "feature\_uri": "mixpeek://multimodal\_extractor@v1/multilingual\_e5\_large\_instruct\_v1",

                        "query": {

                            "input\_mode": "text",

                            "value": "{{INPUT.query}}",

                        },

                        "top\_k": 50,

                    },

                \],

                "fusion": "rrf",

                "final\_top\_k": 50,

            },

        },

        {

            "stage\_name": "rerank",

            "stage\_id": "rerank",

            "parameters": {

                "inference\_name": "BAAI\_\_bge\_reranker\_v2\_m3",

                "query": "{{INPUT.query}}",

                "document\_field": "transcription",

                "top\_k": 10,

            },

        },

    \],

)

\# 4. Search

results \= client.retrievers.execute(

    retriever\["retriever\_id"\],

    inputs\={

    "query": "person explaining machine learning concepts",

},

)

for doc in results\["documents"\]:

    print(doc\["start\_time"\], doc\["end\_time"\], doc\["score"\])

### Feature Extractors

Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

rerank

Rerank documents using cross-encoder models for accurate relevance

sort

### Related Blog Posts

[Cutsio Case Study: Visual Search for Raw Cinema Footage](/case-studies/video-editor-footage-search)

## Frequently asked questions

### What video formats are supported?

Mixpeek supports MP4, MOV, AVI, WebM, MKV, and most common video formats. Videos are automatically transcoded during ingestion.

### How long does video processing take?

Processing time depends on video length and extractors used. A 10-minute video typically processes in 2-5 minutes with standard extractors.

### Can I search within specific timestamps?

Yes. Mixpeek indexes video at the scene or frame level, so search results include precise timestamps for each match.

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

Learn more





](/extractors/multimodal)[

Recipe

### Semantic Multimodal Search

Unified semantic search across all content types. Query by natural language and retrieve relevant video clips, images, audio segments, and documents based on meaning-not keywords or manual tags.

Learn more





](/recipes/semantic-multimodal-search)[

Recipe

### Multimodal RAG

Retrieval-augmented generation across video, images, and text. Retrieve relevant multimodal context, then pass to your LLM with citations back to source timestamps and frames.

Learn more





](/recipes/multimodal-rag)[

Recipe

### Sports Highlights Pipeline

Automatically identify highlight-worthy moments in sports broadcasts using multimodal analysis, visual action detection, audio spike recognition (crowd noise, commentator excitement), and on-screen graphic parsing. Returns timestamped event manifests ready for clip assembly.

Learn more





](/recipes/sports-highlights)[

Extractor

### Scrolling Text Extractor

Read scrolling/marquee video text via phase-correlation band detection, panoramic stitching, and VLM OCR.

Learn more





](/extractors/scrolling-text)[

Extractor

### Video Transcoding (H.264/H.265)

Convert RED R3D, ARRI RAW and mixed-codec video to a web-playable MP4 on your object storage, with codec probing so a misleading file extension does not pick the wrong decoder.

Learn more





](/extractors/transcoding)