Filmstrip generation timeout on long videos #81
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implemented and deployed
Root cause: Client-side filmstrip generation had a 15-second timeout (later bumped to 60s), but seeking through 28 video frames is inherently unreliable under load or on slow connections.
Solution deployed: Server-side filmstrip generation via a new BullMQ worker.
Changes
services/worker/src/workers/filmstrip.js— new worker: downloads proxy from S3, uses FFmpeg to extract a 7×4 sprite sheet (28 frames × 160×90px), uploads tofilmstrips/<assetId>.jpg, writesfilmstrip_s3_keyto DBservices/worker/src/ffmpeg/executor.js— addedextractFilmstrip()using FFmpegtilefilterservices/worker/src/index.js— registeredfilmstripqueue (concurrency=4, configurable viaFILMSTRIP_CONCURRENCY)services/worker/src/workers/proxy.js— dispatches filmstrip job alongside thumbnail job after proxy completesservices/mam-api/src/routes/assets.js— addedGET /api/v1/assets/:id/filmstripendpoint (signed S3 URL)services/mam-api/src/db/migrations/014-filmstrip-column.sql— addedfilmstrip_s3_key TEXTcolumnservices/web-ui/public/screens-asset.jsx— frontend now fetches pre-generated sprite sheet first, slices it into 28 individual frame data URLs, falls back to client-side generation if not availableDeployment
014-filmstrip-column.sqlapplied ✓filmstripqueue active in worker logs ✓Notes for existing assets
Existing assets won't have filmstrips until re-processed (re-upload or hit retry). New assets and any re-ingested assets will get filmstrips generated automatically during the proxy pipeline.