Skip to main content

Media Manager & Visualizer

Project description

๐Ÿ“ธ MM โ€” Universal Organizer for Media

A self-hosted, AI-powered media library manager for photos, videos, and audio.

Scan, tag, search, deduplicate, and browse your media collection with a beautiful web UI.

GitHub Stars GitHub Forks GitHub Issues GitHub Last Commit GitHub License Python TypeScript FastAPI React


Features ยท Quick Start ยท Installation ยท Usage ยท Web UI ยท API ยท Contributing


โœจ Features

Why MM?

Most open-source media managers (Immich, PhotoPrism, LibrePhotos) are designed as heavy, multi-container services that require PostgreSQL, Redis, and dedicated ML micro-services. MM takes the opposite approach โ€” a single Python process with SQLite, installable via pip, runnable on a Raspberry Pi, and fully functional without a GPU.

๐Ÿชถ Lightweight & Zero-Config

  • Single process โ€” no Docker orchestration, no PostgreSQL, no Redis
  • SQLite-backed โ€” zero config, portable, just one .db file
  • pipx install litemm and you're ready to go
  • Runs comfortably on a Raspberry Pi 4 (4 GB)

๐Ÿค– Built-in AI โ€” No External Services

  • CLIP embeddings (ViT-B-32) with optional install
  • Natural language search ("sunset over ocean")
  • Zero-shot auto-tagging (~36 categories)
  • Visual similarity search โ€” all offline, on-device

๐ŸŒ First-Class CJK & Chinese Support

  • Offline reverse geocoding (GeoNames, no API keys)
  • Chinese province & city name translation (ๅ…จๅ›ฝ็œๅธ‚ไธญๆ–‡ๆ˜ ๅฐ„)
  • 170+ Chinese festival detection (ๆ˜ฅ่Š‚ใ€ๆธ…ๆ˜Žใ€ไธญ็ง‹โ€ฆ)
  • Auto-generated festival albums โ€” unique to MM

๐Ÿ“ Non-Destructive & Coexists with Others

  • Read-only indexing โ€” never modifies your original files
  • Works alongside Lightroom / Apple Photos on the same folder
  • Relative path storage โ€” entire library is portable & movable
  • SHA-256 deduplication prevents duplicate imports

๐Ÿ–ฅ๏ธ Full CLI + Web UI

  • Complete command-line toolkit for automation & scripting
  • Template-based import ({year}/{camera}/{original_name}{ext})
  • Beautiful responsive gallery with justified layout & infinite scroll
  • Smart albums auto-generated by tag, camera, year, festival, place

โšก Production-Ready

  • Async API server (FastAPI + Uvicorn)
  • WebP thumbnail caching (4 sizes) with ETag / HTTP 304
  • Multi-library support with runtime switching
  • Frontend bundled in pip package โ€” no Node.js needed to deploy

MM vs. Others

MM Immich PhotoPrism LibrePhotos
Install pip install 6+ Docker containers Docker + MariaDB Docker + PostgreSQL
Min RAM ~300 MB ~4 GB ~2 GB ~4 GB
Database SQLite PostgreSQL MariaDB PostgreSQL
AI search CLIP (optional) CLIP (separate service) TensorFlow CLIP
Chinese localization Province/city/festivals โœ— โœ— โœ—
CLI tooling Full Minimal Minimal โœ—
Modifies originals Never Never Sidecar writes Never
Mobile app โ€” iOS + Android PWA โ€”
Face recognition โ€” โœ“ โœ“ โœ“

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Web UI (React)                        โ”‚
โ”‚         React 19 ยท TailwindCSS ยท Zustand ยท Vite              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚ REST API
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    FastAPI Server                             โ”‚
โ”‚     Auth ยท Media ยท Albums ยท Smart Albums ยท Tags ยท Stats      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Core Engines                               โ”‚
โ”‚  Scanner ยท Metadata ยท Embeddings ยท Tagger ยท Geocoding ยท ...  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               SQLite (Peewee ORM / aiosqlite)                โ”‚
โ”‚         Media ยท Metadata ยท Tags ยท Embeddings ยท Albums        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

# Install with pipx (recommended)
pipx install litemm

# Create a new library (interactive)
mm init

# Start the web server
mm server
# โ†’ Open http://localhost:8000

๐Ÿ“ฆ Installation

Prerequisites

  • Python 3.10+
  • uv (recommended) or pip
  • exiftool โ€” for EXIF metadata extraction
  • ffmpeg / ffprobe โ€” for video/audio metadata & thumbnails
# macOS
brew install exiftool ffmpeg

# Ubuntu / Debian
sudo apt install libimage-exiftool-perl ffmpeg

Install mm

# Install with pipx (recommended)
pipx install litemm

Build the Frontend

cd web
npm install
npm run build
cd ..

๐Ÿ“– Usage

CLI Commands

Command Description
mm init [dir] Create or open a media library (interactive setup)
mm server [dir] Start the web UI server
mm import <source> Import media files into the active library
mm search Search by text, image, or tags (requires CLIP)
mm dedup Find and remove duplicate media files by hash
mm info <file> Show detailed file metadata
mm config [key] [value] Get or set library config values
mm geo update Offline reverse geocode GPS-tagged media
mm db list List all registered databases
mm db set <n> Switch the active database
mm db add <path> Register an existing database file
mm db rm <n> Unregister a database (optionally delete)
mm db stats Show detailed library statistics
mm db clean Remove entries for files no longer on disk
mm db sync <dir> Clean stale entries and re-scan changed files

Library Setup

# Create a new library interactively
mm init ~/Photos

# View all config values
mm config

# Set the import template
mm config import_template "{year}/{year}-{month:02d}-{day:02d}/{original_name}{ext}"

# Sync database with disk (remove stale + re-scan)
mm db sync ~/Photos

# Parallel sync with 8 workers
mm db sync ~/Photos -j 8

Searching

# Semantic search by text (requires CLIP)
mm search --text "sunset at the beach"

# Search by image similarity
mm search --image ~/Photos/reference.jpg --top-k 20

# Filter by tags
mm search --tag landscape --tag nature

Deduplication

# Find and remove duplicate media files (by hash)
mm dedup

Importing & Organizing

# Import from SD card (copies into library using configured template)
mm import ~/DCIM

# Move instead of copy
mm import ~/DCIM --move

Web Server

# Start on default port (8000)
mm server

# Specify library directory
mm server ~/Photos

# Custom host and port
mm server -h 0.0.0.0 -p 9000

# Development mode with auto-reload
mm server --reload

๐ŸŒ Web UI

The web interface provides a full-featured media browser:

  • Library โ€” Browse all media with infinite scroll, date grouping, and adjustable thumbnail sizes
  • Albums โ€” Smart albums auto-generated by tag, camera, year, festival, and location
  • Search โ€” Quick filtering and semantic search
  • Detail View โ€” Full metadata, EXIF info, location, tags, and star ratings
  • Batch Operations โ€” Multi-select for bulk tagging, rating, and deletion
  • Settings โ€” Theme switching (light/dark), library management
  • Auth โ€” User accounts with token-based authentication

๐Ÿ”Œ API

mm exposes a comprehensive REST API at /api/:

Endpoint Description
/api/auth/* Authentication (login, setup, logout)
/api/media Media CRUD, thumbnails, file streaming
/api/batch/* Bulk operations (tags, ratings, delete)
/api/albums/* Album management
/api/smart-albums/* Smart album definitions & resolution
/api/tags Tag CRUD with usage counts
/api/stats Library statistics & timeline
/api/library Multi-library switching
/api/users User management (admin)

Interactive API docs available at /docs (Swagger UI) when the server is running.

๐Ÿ› ๏ธ Tech Stack

Component Technology
Backend Python 3.10+, FastAPI, Peewee ORM, SQLite
AI/ML OpenCLIP (ViT-B-32), PyTorch
Frontend React 19, TypeScript, TailwindCSS, Vite
State Zustand
UI Kit shadcn/ui, Radix UI, Lucide Icons
Media Pillow, pillow-heif, rawpy, exiftool, ffmpeg
Geocoding GeoNames (offline), lunar-python

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

# Clone and install in dev mode
git clone https://github.com/HSPK/mm.git
cd mm
uv sync

Run tests

pytest

Start frontend dev server

cd web && npm install && npm run dev


Please open an issue first to discuss what you would like to change.

## ๐Ÿ“„ License

This project is open source. See the [LICENSE](LICENSE) file for details.

---

<div align="center">

**If you find mm useful, please consider giving it a โญ!**

[![Star History Chart](https://api.star-history.com/svg?repos=HSPK/mm&type=Date)](https://star-history.com/#HSPK/mm&Date)

</div>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litemm-0.1.2.tar.gz (292.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litemm-0.1.2-py3-none-any.whl (87.6 kB view details)

Uploaded Python 3

File details

Details for the file litemm-0.1.2.tar.gz.

File metadata

  • Download URL: litemm-0.1.2.tar.gz
  • Upload date:
  • Size: 292.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for litemm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c951c73fae061feb55df1b73d95a97242153b59f865c13b09ec7b07cb8bb5571
MD5 b731f8dac6480ff559cc8d33e169812d
BLAKE2b-256 a0bb7c94e6ea6f04ad910b03742325b6e1be6074f7819f8d7450a2ad8a20a472

See more details on using hashes here.

File details

Details for the file litemm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: litemm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 87.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for litemm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7113942fa12ab484fa65d1dcd3057f982cfbb41fc7c2e287b97578f6ce3bdc0b
MD5 3ace412f39f9a3d8fcac3073ae62836b
BLAKE2b-256 b0e53b197e5267d9deea797613d28dac9f693d37a1bf320efe194715ba3b4239

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page