Skip to content

feat(video): make a copy every browser plays of what phones and cameras record - #615

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn
Oct 18, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-xfmkzn

Conversation

@adeelahmad

@adeelahmad adeelahmad commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: a video browsers can't play, such as HEVC in a .mov from an iPhone, an AVI, MTS or AMR, was transcribed fine but showed a dead player in the web app.

After: with Settings › Video › Playable copies on (off by default), the transcribe step makes one copy browsers can play (H.264 and AAC in MP4, at most 720 lines high by default, 360/480/720/1080 to pick). It is kept in data_dir/playable/, encrypted like the rest when the namespace is, and deleted with the recording. The player gets the copy; /media, IIIF and feeds still give the original. Files browsers already play get no copy.

How: a new domain/playable.py decides from ffprobe whether a copy is needed and makes it with ffmpeg; jobs.py runs it in the transcribe step; the player's audio route serves the copy.

Motivation and Context

Item from the personal feature plan sheet ("play any phone video in the browser").

Screenshots (if appropriate):

n/a

Steps to reproduce (if appropriate):

Turn on Settings › Video › Playable copies, upload an HEVC .mov, and open it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests (tests/api/test_playable.py).
  • My change requires documentation updates, and I have updated docs/ accordingly (docs/video.md, Playable copies).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. Written as changelog.d/playable-copies.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.

Done questions (AGENTS.md)

  • Goal: delivers what the user wanted, merged on green CI.
  • Agents: usable through the API, MCP or an assistant tool. The settings are in the settings API; the player route serves the copy.
  • Zero setup: no new prerequisite, .env edit or manual step. Uses the ffmpeg Lens already uses.
  • Fewest clicks and keystrokes. One switch; copies are made on their own.
  • Configurable: new settings in the web app with defaults; wizard asks only what is required. Switch and height in Settings › Video, off by default.
  • Light: default install still runs on a Raspberry Pi with cloud models. Off by default; only files browsers can't play are converted.
  • Private and secure: data local and encrypted, passkeys, threat model updated. Copies stay beside the original, encrypted the same way; no new surface.
  • Cost: cheapest path, model calls in the activity ledger, budgets respected. n/a: no model calls.
  • User decides: consequential or new actions wait for the user; defaults unchanged.
  • Upgrades: existing installs upgrade safely (upgrade step for stored-data changes). n/a: two new settings with defaults; no stored-data change.
  • Honest: sources cited; labelled built, in progress or planned.
  • Tests, docs and generated files updated. OpenAPI regenerated with the tooling.
  • Open standards; dependencies keep Lens MIT. H.264/AAC in MP4 through ffmpeg.
  • Result reported with evidence; "refine later" items written down. Docs say recordings from before the switch get a copy when their transcribe step runs again; a batch for them is for later.
  • Reuse: existing Lens code and permissive libraries reused, nothing reinvented.

Local CI (ci/local-ci.sh): FastAPI (embedded and server), Next.js, pre-commit and PR title passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ

…as record

With video.playable_copies on (off by default), the transcribe step makes one
copy of media browsers can't play (HEVC, AVI, MTS, AMR, Windows Media) as H.264
and AAC in MP4, at most video.playable_height lines high. The player gets the
copy; /media, IIIF and feeds still give the file itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
@adeelahmad adeelahmad self-assigned this Oct 18, 2026
@adeelahmad
adeelahmad merged commit 19365f9 into main Oct 18, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-xfmkzn branch October 18, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants