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, import safely, 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

  • Zero-shot auto-tagging (~36 categories)
  • Optional OpenCLIP install for local auto-tagging

๐ŸŒ 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 duplicate detection prevents duplicate imports

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

  • Complete command-line toolkit for automation & scripting
  • Template-based import ({year}/{camera}/{hour:02d}{minute:02d}{second:02d}{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
Auto-tagging 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 ยท Tagger ยท Geocoding ยท ...          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               SQLite (Peewee ORM / aiosqlite)                โ”‚
โ”‚              Media ยท Metadata ยท Tags ยท 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 tags
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}/{hour:02d}{minute:02d}{second:02d}{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

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

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.5.tar.gz (451.8 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.5-py3-none-any.whl (248.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: litemm-0.1.5.tar.gz
  • Upload date:
  • Size: 451.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for litemm-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e553fed86edcd90a9aca07a59bca09d334f50553650bf00d7c008e6d49c21550
MD5 f7f04d2f18e658167194850ad7bdb316
BLAKE2b-256 1d6e8ee4db190106efb3c632bb09f5fa8f3fb724a04032aedc7f7ddaccac0185

See more details on using hashes here.

Provenance

The following attestation bundles were made for litemm-0.1.5.tar.gz:

Publisher: release.yml on HSPK/mm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: litemm-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 248.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for litemm-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a7bf8fec39989e0a2307ca76ee39497a8412e278e04ee431598caedb218ea653
MD5 2e19604591cc39e04e81c125fc1df63a
BLAKE2b-256 e1e4d422eb8fa133be038f79793389f8c691b06ff58aa4b6cc8ce321bdb06b76

See more details on using hashes here.

Provenance

The following attestation bundles were made for litemm-0.1.5-py3-none-any.whl:

Publisher: release.yml on HSPK/mm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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