1 Changelog V1.21.77
Forgejo Actions edited this page 2026-10-14 08:13:02 +00:00

v1.21.77

Date: 2026-10-14

Features

  • Video support (spec 059), Immich-parity timeline + viewer treatment for videos:
    • Worker: video_preview job implemented via ffmpeg — generates a 512px JPEG poster thumbnail, a 2048px JPEG poster preview, and a ≤720p H.264/AAC MP4 video_rendition (+faststart, yuv420p, -an when no audio stream) from one ffprobe-guided frame seek; robust unknown/short-duration seek handling, 10-minute per-invocation timeouts, video_preview_failed issues carrying the tool's stderr tail. extract_metadata now handles videos via ffprobe (width/height/duration_millis/creation_time capture timestamp with plausibility guard). ffmpeg added to the worker image; verifyRuntime warns when ffmpeg/ffprobe are missing. Worker now heartbeats running jobs every 60s (lease was fixed at 300s, a long transcode could outlive it and get its uploads rejected).
    • API: new user-facing GET /api/media/{id}/original — streams the original with the same owner/contribution/collaborative-people authorization as derived assets (predicate extracted to shared MediaAuthorizationSql), inline Content-Disposition (RFC 5987), ETag/Last-Modified/private-immutable caching, and HTTP Range support (Spring MVC resource slicing; proven by test: Range: bytes=0-3 → 206 + Content-Range + Accept-Ranges). GET /api/media/{id}/derived/video_rendition is servable. Timeline items and media detail gain videoRenditionUrl (videos with a rendition only) and durationMillis. Upload commit enqueues video_preview for videos (photos excluded via a video-pixels gate). OpenAPI contract updated. This fixes the server half of Android video playback (KNOWN_ISSUES ISSUE-115 → mitigated).
    • Web: video tiles get a permanent glassy play badge (bottom-left) and a tabular-numerals duration pill (bottom-right, m:ss/h:mm:ss); hovering (fine pointer, 250ms intent, suppressed in selection mode) crossfades the tile to a muted looping rendition preview — src is fetched only on first hover, released on leave/blur/scroll-away/selection entry; keyboard focus triggers the same preview; touch devices keep tap-to-open. The media viewer plays videos in a letterboxed <video controls autoplay playsinline> (keyed per item, sound-on with a graceful muted-fallback + "Ton einschalten" pill when autoplay policy blocks sound, poster + friendly message when nothing is playable), arrows keep working with seek priority while the player has focus, and the info panel shows Duration. New paraglide keys in en/de/da. Photo tiles are pixel-identical to before.

Notes

  • Backend: MediaJobHandlers/VideoTools (new; pure command builders + ffprobe JSON parsing, stubbed ProcessRunner seam for tests), MediaWorkerRunner (heartbeat executor), CoreApiWorkerClient (variant-discriminated idempotency keys for multi-artifact video_preview results — without this results 2/3 would replay as cache hits and never be promoted), Dockerfile. Tests: MediaJobHandlersTest (56), MediaWorkerDrainTest (8) — 64/64 green; ffmpeg argv smoke-tested against real ffmpeg 6.1.1 (posters landscape/portrait, no-upscale cap, audio/no-audio renditions, faststart).
  • API: MediaOriginalController + MediaAuthorizationSql (verbatim predicate extraction, zero behavior change), DerivedAssetController (video_rendition type), TimelineItem/MediaDetail/TimelineQueryService (rendition key aggregated in all 6 derived laterals; duration selected in all item queries; compat ctor keeps existing JSON field order), WorkerJobEnqueueService (requiresVideoPixels/supportsVideoPixels). Tests: MediaOriginalControllerTest (incl. Range), DerivedAssetControllerTest, TimelineQueryServiceTest, WorkerJobEnqueueServiceTest; full :apps:api:test green.
  • Web: VideoTilePreview.svelte (self-contained tile treatment), hoverPreview.ts (DOM-free state machine + registry), videoUtils.ts (pure helpers), viewer/MediaGrid/MediaInfoPanel/Icon/messages changes. Tests: 25 new unit tests, Playwright video-tiles.spec.ts (3 passed, mobile hover skipped by design); npm run check clean (18 pre-existing warnings only), unit suite 239/239.
  • Known issues: ISSUE-115 → mitigated; new ISSUE-155 (pre-existing videos need a backfill/reprocess pass before they show posters), ISSUE-156 (original-streaming fallback until renditions exist), ISSUE-157 (video metadata extraction loads originals into heap — streaming download is future work).
  • Version bump 1.21.76 → 1.21.77 (PR branch, gradle.properties).