Edit Mind lets you index your videos (including transcription, frame analysis, and multi-model embedding), and you can search your videos (or specific video scenes) using natural language.
Development Status: Edit Mind is currently in active development and not yet production-ready. Expect incomplete features and occasional bugs. We welcome contributors to help us reach v1.0!
Note: (Edit Mind name is coming from Video Editor Mind, so this will be editor's second brain in the future)
Click to watch a walkthrough of Edit Mind's core features.
- Search videos by spoken words, objects, faces, etc...
- Runs fully locally, respecting privacy.
- Works on any computer or server with Docker installed.
- Uses AI for rich metadata extraction and semantic search.
- Video Indexing and Processing: A background service watches for new video files and queues them for AI-powered analysis.
- AI-Powered Video Analysis: Extracts metadata like face recognition, transcription, object & text detection, scene analysis, and more.
- Vector-Based Semantic Search: Powerful natural language search capabilities on video content using ChromaDB.
- Dual Interfaces: Access your video library through a Web App.
| Area | Technology |
|---|---|
| Monorepo | pnpm workspaces |
| Containerization | Docker, Docker Compose |
| Web Service | React Router V7, TypeScript, Vite |
| Background Jobs Service | Node.js, Express.js, BullMQ |
| ML Sevice | Python, OpenCV, PyTorch, OpenAI Whisper, Google Gemini or Ollama (Used for NLP) |
| Vector Database | ChromaDB |
| Relational DB | PostgreSQL (via Prisma ORM) |
Edit Mind uses Docker Compose to run everything in containers.
- Docker Desktop installed and running.
- That's it! Everything else runs in containers.
mkdir edit-mind
cd edit-mindImportant: Before proceeding, configure Docker to access your media folder.
macOS/Windows:
- Open Docker Desktop
- Go to Settings β Resources β File Sharing
- Add the path where your videos are stored (e.g.,
/Users/yourusername/Videos) - Click Apply & Restart
Linux: File sharing is typically enabled by default.
Edit Mind uses a two-file environment configuration:
.env- Your personal configuration (required).env.system- System defaults (required)
Copy the example file and customize it:
curl -L https://raw.githubusercontent.com/IliasHad/edit-mind/refs/heads/main/.env.example -o .env
curl -L https://raw.githubusercontent.com/IliasHad/edit-mind/refs/heads/main/.env.system.example -o .env.system
curl -L https://raw.githubusercontent.com/IliasHad/edit-mind/refs/heads/main/docker-compose.yml -o docker-compose.ymlEdit the .env file and configure these critical settings:
# 1. SET YOUR VIDEO FOLDER PATH (REQUIRED)
# Must match the path you added to Docker File Sharing
HOST_MEDIA_PATH="/Users/yourusername/Videos"
# 2. CHOOSE AI MODEL (Pick one option)
# Option A: Use Ollama (more private, requires model download)
USE_OLLAMA_MODEL="TRUE"
OLLAMA_HOST="http://host.docker.internal"
OLLAMA_PORT="11434"
OLLAMA_MODEL="qwen2.5:7b-instruct"
# Please make sure to run ollama server first using this command
# OLLAMA_HOST=0.0.0.0:11434 ollama serve
# and pull the ollama model first
# ollama pull qwen2.5:7b-instruct
# Option B: Use Local Model (more private, requires model download)
# USE_LOCAL_MODEL="true"
# SEARCH_AI_MODEL="/app/models/path/to/.gguf"
# The AI model should be downloaded and saved it to models folder in the project root dir
# Option C: Use Gemini API (requires API key)
USE_LOCAL_MODEL="false"
GEMINI_API_KEY="your-gemini-api-key-from-google-ai-studio"
# 3. GENERATE SECURITY KEYS (REQUIRED)
# Generate with: openssl rand -base64 32
ENCRYPTION_KEY="your-random-32-char-base64-key"
# Generate with: openssl rand -hex 32
SESSION_SECRET="your-random-session-secret"Quick Key Generation:
# Generate ENCRYPTION_KEY
openssl rand -base64 32
# Generate SESSION_SECRET
openssl rand -hex 32Start all services with a single command:
docker compose upOnce all services are running (look for "ready" messages in logs):
- Web App: http://localhost:3745
- Navigate to the web app at
http://localhost:3745 - Login using
[email protected]and password isadmin - Navigate to the web app at
http://localhost:3745/app/settings - Click "Add Folder"
- Select a folder from your
HOST_MEDIA_PATHlocation - Click on the folder and Click on
Rescan - The background job service will automatically start processing your videos and will be start watching for new video file events
This section provides an overview of the various packages within this monorepo. Each package is designed to handle a specific set of responsibilities, promoting modularity and reusability.
Purpose: Handles all interactions with Artificial Intelligence models (both local and cloud-based).
- Responsibilities:
- Interprets natural language user queries for search and chat.
- Classifies user intent (e.g., compilation, analytics, general chat).
- Converts queries into a structured JSON format for the search service.
- Generates user-facing messages, analytics summaries, and creative video compilation ideas.
- Supports multiple AI backends like Google Gemini and local models (via
node-llama-cpp) orOllama.
Purpose: Manages communication with the vector database (ChromaDB) and handles the creation of embeddings.
- Responsibilities:
- Provides a client for interacting with ChromaDB collections.
- Creates text, visual, and audio embeddings for video scenes using libraries like
@xenova/transformers. - Stores, retrieves, and searches for scenes based on vector similarity (hybrid search).
- Manages separate collections for text, visual, and audio data to support multi-modal search.
- Provides utilities for batch embedding scenes text, visual, and audio segments.
Purpose: A comprehensive toolkit for all media processing tasks.
- Responsibilities:
- Extracts video metadata using
ffmpeg. - Generates thumbnails for videos and scenes.
- Extracts individual frames and audio segments from videos for visual embedding.
- Stitches video scenes together to create compilations.
- Reads camera metadata (e.g., GoPro telemetry) and EXIF data for location and date information.
- Extracts video metadata using
Purpose: Centralizes database client and schema management.
- Responsibilities:
- Exports the Prisma Client instance for use across the application.
- Ensures that all parts of the application use a single, consistent database connection.
Purpose: Defines the application's database schema and manages migrations.
- Responsibilities:
- Contains the
schema.prismafile, which is the single source of truth for database models. - Includes scripts for seeding the database with initial data (
seed.ts). - Manages database migrations to keep the schema in sync with the models.
- Contains the
Purpose: Orchestrates the entire search process, from user query to results.
- Responsibilities:
- Takes a user query, and then uses the structured result to query the vector database.
- Consolidates results and prepares them to use.
Purpose: Contains code, types, and utilities that are shared across multiple packages.
- Responsibilities:
- Defines shared TypeScript types and Zod schemas.
- Provides common services like
loggerandcache. - Includes shared utility functions.
Purpose: Manages the creation and maintenance of "smart collections" of videos.
- Responsibilities:
- Defines criteria for dynamic collections (e.g., "Moments with X," "Conversations and Talks").
- Queries the vector database to find media that matches the collection criteria.
- Generates and updates these collections automatically.
A huge thank you to the r/selfhosted community on Reddit for their amazing support, valuable feedback, and encouragement.
Original discussion: https://www.reddit.com/r/selfhosted/comments/1ogis3j/i_built_a_selfhosted_alternative_to_googles_video/
We welcome contributions of all kinds! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
Follow the steps below if you want to extend the app functionality or fix bugs.
git clone https://github.com/iliashad/edit-mind
cd edit-mindcp .env.system.example docker/.env.system
cp .env.example docker/.env.devpnpm install
cd docker
docker-compose -f docker-compose.dev.yml up --build
Watch the Edit Mind presentation at Twelve Labs (starts at 21:12)
This project is licensed under the MIT License - see the LICENSE.md file for details.