Archive videos: shown and played in the galleries, old videos found on the next walk #71

Merged
spark merged 3 commits from task/archive-video into main 2026-10-20 16:02:50 +01:00
Owner

Videos in the archive's cloud folders are walked like photos into cloud_videos; a folder of videos only is a gallery too. The worker makes a web copy with ffmpeg (H.264/AAC MP4, short side at most 1080 px, faststart), a poster and a thumbnail; the original stays on the cloud. Viewers get them by signed links with Range support, in the galleries the cloud shares with them, above the photos, and in a player like the large photo. Download is the web copy; the original's link only for those who edit on the cloud.

  • Stored galleries (main #70): video_count summed per gallery card, a videos-only gallery takes its first video's frame as cover, the gallery page carries the videos of every part, only from published folders.
  • Migration 20261020150000_archive_videos: new table and column; clears the folders' etags and schedules every cloud's walk, so videos skipped until now are found. Nothing is deleted; photos already indexed keep their etag and are not indexed again.
  • Deploy: when the host has no ffmpeg, the API deploy installs a static build in ~/.local/ffmpeg (md5 checked); the worker finds it. Videos wait as FAILED ffprobe_missing otherwise, and "Analisar agora" retries them.
  • Docs: docs/archive.md (Videos), docs/DEPLOY.md.

Tests: API 324 passed; the one failure (delivery.test.ts ZeroZero upload) fails on main 41eff14 too, unrelated. New: src/archive/video.test.ts (ranges, probe, signing, ffmpeg on real clips) and an end-to-end archive test (walk, index, shares, Range, tampered links, removal, ffmpeg missing). Site: typecheck, tests, next build; screens checked on desktop and phone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo

Videos in the archive's cloud folders are walked like photos into `cloud_videos`; a folder of videos only is a gallery too. The worker makes a web copy with ffmpeg (H.264/AAC MP4, short side at most 1080 px, faststart), a poster and a thumbnail; the original stays on the cloud. Viewers get them by signed links with Range support, in the galleries the cloud shares with them, above the photos, and in a player like the large photo. Download is the web copy; the original's link only for those who edit on the cloud. - Stored galleries (main #70): `video_count` summed per gallery card, a videos-only gallery takes its first video's frame as cover, the gallery page carries the videos of every part, only from published folders. - Migration `20261020150000_archive_videos`: new table and column; clears the folders' etags and schedules every cloud's walk, so videos skipped until now are found. Nothing is deleted; photos already indexed keep their etag and are not indexed again. - Deploy: when the host has no ffmpeg, the API deploy installs a static build in `~/.local/ffmpeg` (md5 checked); the worker finds it. Videos wait as FAILED `ffprobe_missing` otherwise, and "Analisar agora" retries them. - Docs: `docs/archive.md` (Videos), `docs/DEPLOY.md`. Tests: API 324 passed; the one failure (`delivery.test.ts` ZeroZero upload) fails on main 41eff14 too, unrelated. New: `src/archive/video.test.ts` (ranges, probe, signing, ffmpeg on real clips) and an end-to-end archive test (walk, index, shares, Range, tampered links, removal, ffmpeg missing). Site: typecheck, tests, next build; screens checked on desktop and phone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
spark added 2 commits 2026-10-20 15:42:27 +01:00
Videos in gallery folders are walked like photos into cloud_videos (a folder of videos only is a gallery too).
The worker makes an H.264/AAC MP4 (short side at most 1080 px, faststart), a poster and a thumbnail; the
original stays on the cloud. Viewers get them by signed links with Range support, above the photos, in a player
like the large photo; download is the web copy, the original's link only for those who edit on the cloud.

Also gives the face review's overlay its own class: it reused .arq-lightbox and broke the large photo's layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
Merge main into archive videos: videos in the stored galleries, old videos found on the next walk, ffmpeg on deploy.
ci / rust (pull_request) Successful in 3m49s
ci / typescript (pull_request) Failing after 6m55s
dd07599447
Videos count in the galleries main now stores (a game's parts share one card): video_count summed per gallery, the
first video's frame as cover of a videos-only gallery, the videos of every part in the gallery page, and only from
published folders. The face review keeps main's own overlay class (.arq-rlightbox).

The migration (renumbered after main's) clears the folders' etags and walks every cloud at once, so the videos the
walks skipped until now are found; photos already indexed keep their etag and are not indexed again.

The API deploy puts a static ffmpeg in ~/.local/ffmpeg (md5 checked) when the host has none; the worker uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
spark added 1 commit 2026-10-20 15:51:23 +01:00
Take a replaced zerozero image back again: skip only the "synced-" placeholder, not every id that is not digits.
ci / rust (pull_request) Successful in 3m47s
ci / typescript (pull_request) Failing after 7m20s
8a78398fdf
d204db4 skipped any id that is not all digits, which also skipped real ids the desk can answer (main's CI has been
red since, on the delivery test that checks a replaced photo's old image is taken back). Only the placeholder that
`upload` returns when the desk already had the file is skipped now, with a test of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
paperclip-review-bot left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
founding-engineer left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
devops-engineer left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
spark scheduled this pull request to auto merge when all checks succeed 2026-10-20 16:02:50 +01:00
spark merged commit f8eb7ec66e into main 2026-10-20 16:02:50 +01:00
Sign in to join this conversation.