Skip to content

ingest-content

Use when building a media ingestion pipeline — processing raw video/audio/image files, extracting technical metadata, AI-driven scene classification, deduplication by perceptual hash, or organizing footage into an indexed library. Also use when setting up batch processing for large media collections or building a RAG-ready asset database.

ModelSource
sonnetpack: video
Full Reference

┏━ 🔧 ingest-content ━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when building a media ingestion pipeline —… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Systematic pipeline for transforming raw media files into a structured, searchable, AI-enriched library. Five stages: intake → metadata extraction → AI classification → deduplication → indexing. Each stage is independently composable.

ItemValue
Supported video formats.mp4, .mov, .avi, .mkv, .webm, .mxf
Supported audio formats.mp3, .wav, .aac, .flac, .m4a
Supported image formats.jpg, .jpeg, .png, .webp, .tiff, .raw
Metadata toolfluent-ffmpeg + @ffprobe-installer/ffprobe
Image processingsharp
AI classification modelgemini-2.5-flash via @google/genai
Dedup algorithmdHash (difference hash) + Hamming distance
Near-duplicate thresholdHamming distance < 5
Batch concurrencyp-queue, default 4
DatabasePostgres + pgvector (HNSW index for embeddings)
I want to…File
Scan directories, validate file types, or extract video/image metadata with ffprobe/sharpintake-and-metadata.md
Classify scene type, mood, and content tags from a video keyframe using Gemini Visionai-classification.md
Compute perceptual hashes, detect near-duplicates, or compare with Hamming distancededuplication.md
Run the full batch pipeline, set up the Postgres schema, or write the library indexpipeline-and-indexing.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.