Skip to content

Repository files navigation

morphic

A self-hosted media toolkit — format conversion, duplicate detection, and file organisation in a single dark-themed web UI, built entirely in Go.

Build


Features

🔄 Converter

Convert images and videos between popular formats directly in the browser.

  • Scan any folder (with optional subfolder recursion) filtered by images, videos, or both
  • Per-extension summary with badge counts and filter pills
  • Select individual files or batch-select by extension
  • Pick a target format and convert in one click — live progress bar with per-file feedback
  • Images — jpg, png, tif, bmp, webp, gif, ico, avif (via the imaging library)
  • Videos — mp4, mov, avi, mkv, webm, flv, wmv, m4v, mpeg, 3gp, ts (via ffmpeg)
  • Optionally delete originals after a successful conversion
  • Stop an in-flight conversion at any time

🔍 Dupfinder

Find visually similar media using perceptual hashing — catches re-encoded or resized duplicates that byte-comparison misses.

  • Three hash types combined (pHash, aHash, dHash) for higher accuracy
  • Configurable similarity threshold per type (images: 90 %, videos: 85 % default)
  • Video analysis by comparing frame hashes across a clip
  • Multi-worker concurrent hashing with a configurable worker count
  • Grouped results with thumbnail previews, file sizes, and space-savings estimate
  • One-click auto-select of duplicates (keeps the largest file in each group)
  • Stop scan mid-flight and discard partial results

📂 Organizer

Restructure a media collection into clean date-based folders or rename files in bulk.

  • Date sort — moves/copies files into {year}/{month}/{day} trees using EXIF date or mtime fallback
  • Rename — template tokens: {date}, {datetime}, {original}, {ext}, {seq}, {seq:N} (zero-padded)
  • Preview the full plan before executing — see every source → destination path
  • Move or copy mode
  • Conflict detection — skips renames that would overwrite another file

Quick Start

git clone https://github.com/exterex/morphic
cd morphic
make build # compiles to ./bin/morphic
./bin/morphic # opens http://127.0.0.1:8000 in the browser
# Custom options
./bin/morphic --port 9000 --folder ~/Pictures --no-browser

Prerequisites

DependencyRequired forInstall
Go 1.22+Buildinghttps://go.dev/dl/
ffmpegVideo conversion & video duplicate detectionsudo apt install ffmpeg

ffmpeg is optional — the app starts without it and greys out video features automatically.


Development

make tidy # go mod tidy
make build # build binary → ./bin/morphic
make test# go test ./...
make vet # go vet ./...
make run # build + start dev server

Architecture

cmd/morphic/ CLI entry-point (flags, server startup)
internal/
converter/ Folder scanner, image/video conversion logic
dupfinder/ Perceptual hashing, duplicate grouping, job runner
organizer/ Date sorter, batch renamer, plan executor
shared/ Job store, file browser, thumbnail generator, constants
web/
server.go Gin router, embedded static assets
routes_*.go HTTP handlers per module
templates/ index.html (single-page UI)
static/ app.js, style.css

API Overview

All endpoints are under /api/.

MethodPathDescription
POST/api/converter/scanScan a folder for convertible media
POST/api/converter/convertStart a batch conversion job
GET/api/converter/progress/:id/pollPoll conversion progress
POST/api/converter/progress/:id/cancelCancel a running conversion
POST/api/dupfinder/scanStart a duplicate scan job
GET/api/dupfinder/scan/:id/statusPoll scan status
GET/api/dupfinder/scan/:id/resultsFetch scan results
POST/api/dupfinder/scan/:id/cancelCancel a running scan
POST/api/organizer/planCreate an organisation plan
POST/api/organizer/execute/:idExecute a previewed plan
POST/api/organizer/cancel/:idCancel a running plan job
GET/api/browseList directories (in-page browser)
GET/api/thumbnailGenerate a JPEG thumbnail
GET/api/system_infoReport Go/ffmpeg version info

License

Released under the MIT License.

About

Unified media toolkit — format conversion, duplicate detection, EXIF inspection, batch resizing, and file organization in a single tabbed web UI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages