Storytelling Mode vs. Even-Spread Flipbook
Ordering photos by date alone makes the face jump randomly across the screen, while naive tight face crops turn memories into a sterile row of ID photos. Immich Life Timeline rotates, scales, and translates every frame so the eyes stay anchored at the exact same spot while keeping the full person and surrounding context visible.
- Zero sliders by default: Pick who (and optionally a date range). Duration is automatically computed between 16 and 150 seconds, with one-click Shorter / Longer refinement after watching.
- Automatic Time Chapters & Hero Shots: Splits the journey into chapters (2-year, year, half-year, quarter, or month), guarantees at least one photo per chapter, and holds each chapter's hero shot nearly twice as long to create pacing.
- Eye-Centered Subtle Zoom & Cross-Fades: Slow motion zoom anchored on the eye midpoint keeps every shot alive without drifting the face.
- Real Video Clips with Audio: Scans library videos to extract the sharpest, steadiest clip featuring your subject, tracks and anchors their moving face path, and cross-fades audio naturally before and after the cut.
Prefer the classic rapid flipbook style? Switch to Even spread mode under the Expert view.
Core Architecture: Reusing Immich's Work
Immich already ran heavy face detection (SCRFD) and facial recognition (ArcFace) and stored bounding boxes, vectors, and person clusters in Postgres. This tool reads those tables read-only and writes its own metadata exclusively to separate fp_* tables:
| Task | Model | Executed By |
|---|---|---|
| Detect faces & recognition vectors in photos | SCRFD + ArcFace | Immich (reused read-only) |
| Head pose (yaw/pitch/roll) & 68 3D landmarks | 1k3d68 (in buffalo_l) |
indexer |
| Body pose & 17 keypoints (posture/orientation) | yolov8n-pose |
indexer |
| Face tracking across video frames | det_10g + w600k_r50 |
indexer (bundled in buffalo_l) |
| Face anchoring during rendering | No model needed | timeline (~300 MB RAM) |
Two Components
Immich (Facial Recognition already completed)
├── indexer (periodic job — ~700 MB peak RAM, resumable)
│ 1. assets → fp_asset (photos, videos, capture dates)
│ 2. faces → fp_face (copied bbox + vector from Immich)
│ 3. landmarks → fp_face (yaw/pitch/roll, sharpness, eye anchor)
│ 4. bodies → fp_body (17 keypoints, posture, torso orientation)
│ 5. clips → fp_vface / fp_vclip (best moving clips + face path)
└── timeline (web UI on :8080 — loads zero ML models)
Pick person (+ date range) → Chapters → Anchor frames → FFmpeg MP4
Prerequisites
- A running Immich instance with Facial Recognition completed (Administration → Jobs).
- Network or local access to Immich's PostgreSQL database.
- Read-only mount of Immich's
UPLOAD_LOCATION(strongly recommended; required for video clip scanning) or an Immich API key. - No GPU required — designed for 4 CPU cores / 8 GB RAM alongside Immich (
ONNX_THREADS=2, sequential single-model loading,SLEEP_MSthrottling).
Quick Start with Docker Compose
Prebuilt container images are published on GHCR (ghcr.io/sinhsac/immich-life-timeline/fp-indexer and fp-timeline):
git clone https://github.com/sinhsac/immich-life-timeline.git
cd immich-life-timeline
cp .env.example .env
# Edit .env: set PG_PASSWORD and UPLOAD_LOCATION (or IMMICH_URL + IMMICH_API_KEY)
# 1. Download models once (~300 MB)
docker compose --profile setup up
# 2. Validate Postgres, media access, and models before a full scan
docker compose run --rm indexer --dry-run
# 3. Run the library indexer (safe to stop/resume anytime)
docker compose run --rm indexer
# Check indexing progress
docker compose run --rm indexer --stats
# 4. Launch the web UI on http://localhost:8080
docker compose up -d timeline
Whenever new photos are added to Immich, rerun docker compose run --rm indexer. Progress is tracked per batch in fp_asset with a Postgres advisory lock, so it only indexes new items and cleanly resumes after power cuts or SIGTERM.
Deploying on Kubernetes / k3s
Sample manifests are available in indexer/deploy/k3s.yaml and timeline/deploy/k3s.yaml. Adjust hostPath volumes and apply:
kubectl create ns media
kubectl -n media create secret generic immich-db --from-literal=password='...'
kubectl apply -f indexer/deploy/k3s.yaml
kubectl apply -f timeline/deploy/k3s.yaml
# Trigger an immediate scan outside the CronJob schedule
kubectl -n media create job --from=cronjob/fp-indexer fp-run-1
kubectl -n media logs -f job/fp-run-1
4-Step Expert Workflow & Framing Guide
Flip the Expert switch in the top-right corner of the UI to unlock fine-grained control:
- Pick Clusters: Immich often splits a person across child, teen, and adult clusters. Select multiple clusters and use Find clusters of the same person (always visually verify household relatives).
- Automatic Chapter Collection: Review photo distribution by year and chapter so dense vacations never crowd out quieter years.
- Tune Thresholds: Adjust head angle, sharpness, brightness, and posture sliders. Every rejected photo explicitly states why it was excluded.
- Preview & Render: Inspect the exact frame-accurate runtime, preview three frames spread across time, and export MP4.
Choosing face_frac
face_frac Value |
Framing Result |
|---|---|
0.50 – 0.60 | Tight portrait; surrounding context cropped away. |
0.10 – 0.15 (Default) | Balanced full-person & environment storytelling framing. |
0.06 – 0.08 | Wide scenic shot with smaller subject. |
Use fill=blur if you prefer keeping the full photo with blurred side/top fill instead of zooming in to avoid empty borders.
Security & Practical Notes
API_TOKEN Before Exposing Beyond LocalhostThe timeline service can read your entire Immich library. Always configure API_TOKEN (authenticate via ?token=... cookie or Authorization: Bearer ...) and place it behind TLS before exposing it on a network.
- Skip video scanning on slow CPUs: Set
DO_VIDEO=0if you only want still-photo timelines (video scanning atVIDEO_FPS=2takes ~10–15 s per 1-minute clip on 4 cores and requiresMEDIA_ROOT). - OpenAPI & Direct SQL: Full API docs are served at
/api/docs. Detailed env vars live inindexer/README.mdandtimeline/README.md.