From bb063d6f94649ed9a5ddb7befb3aa0c4ecb0a0a5 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 May 2026 10:12:14 +0200 Subject: [PATCH] 127-mule-photos-new: pre-transcode pass + perf characterisation Measured cold-cache behaviour: thumbnails ~2ms, HEVC video playback 12-21s TTFB because libx264 transcodes inline and serialised one ffmpeg at a time. Sibling thumbs unaffected (~2ms during transcode). With 11/45 .mov files already pre-baked, ~75% of clicks were cold. Ran `photoprism convert` to bring sidecar coverage to 45/45; previously cold videos now serve in ~2ms TTFB. Co-Authored-By: Claude Opus 4.7 (1M context) --- containers/127-mule-photos-new.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/containers/127-mule-photos-new.md b/containers/127-mule-photos-new.md index 959559f..e7f648d 100644 --- a/containers/127-mule-photos-new.md +++ b/containers/127-mule-photos-new.md @@ -200,6 +200,32 @@ DELETE FROM auth_sessions WHERE user_name='dtoro'; Stale sessions are dropped so a fresh OIDC login mints an admin token. +**Video pre-transcode pass** (no upstream change — operational fix on +this LXC). Only 11/45 `.mov` originals had a `.avc` sidecar; the rest +forced 12–21 s inline libx264 transcodes on first playback, serialised +one ffmpeg at a time. Measured cold vs warm: + +| Path | TTFB | +| --------------------------------- | ------- | +| Thumbnail `fit_1280` (warm) | ~2 ms | +| Video playback with `.avc` sidecar | ~2 ms | +| Video playback without sidecar | 12–21 s | +| Thumbnail GET *during* a transcode | ~2 ms (no sibling slowdown — 6-core LXC, ffmpeg ~6%/core, nvme util 0.01%) | + +Mitigation: + +```bash +pct exec 127 -- docker exec -d pp-app /opt/photoprism/bin/photoprism convert +``` + +Walks the library, builds every missing `.avc` next to its original +(`/photoprism/storage/sidecar///.mov.avc`), +idempotent on re-run, two ffmpeg processes in parallel. Took ~8 min +to bring coverage to 45/45. Previously-cold videos verified to serve +at ~2 ms TTFB after the pass. Future imports get AVC sidecars +automatically as part of indexing; a re-run is only needed if videos +ever land outside the indexer's path. + **Folder tree** (upstream commits `8083328`, `505fef5`, `cfd85a1`). PhotoPrism's `path:` operator is exact-match by default but supports a `*` wildcard. Without it, every internal tree node (year folders,