Read the guidelines properly (n8n.notion.site/Template-submission-guidelines)
and the template failed three of them.
A single sticky explaining the whole template is mandatory and there
wasn't one, only per-stage notes; the overview sticky now carries the
full description in the sections reviewers expect (who it's for, what it
does, setup, requirements, customising), and the stage notes drop to the
neutral colour the guidelines ask for so the overview is the one that
stands out.
The title now follows the required 'action verb + object + destination'
shape instead of a product name plus a slogan.
Configuration is grouped into Set nodes, which the guidelines ask for and
which fixes a genuinely bad bit of design: pasting the same Telegram chat
id into six separate nodes. Each trigger branch gets its own Settings
node because a branch cannot read a node another branch ran, so it is
three edit points now, all named and in one place per branch.
Re-tested end to end after the restructure: the webhook branch still
splits the clips and delivers them to Telegram, which is the path the new
Set node sits in.
The static ISP pool (dfa3124) moved downloads off the paid proxy but never
touched cloud/metering.py, so probe_url_minutes kept reading PROXY_URL alone.
Every managed YouTube submission still paid DataImpulse for 0.2-1 MB of yt-dlp
metadata (measured through a counting proxy) while the download itself went out
free over Decodo — and invisibly, because PROXY_BYTES only counts the bytes of
the winning download attempt.
The probe now walks the same cheapest-first chain as the download: direct when
DIRECT_FIRST=1, then the statics rotated per probe, then the paid proxy as the
last resort. Proxies are the outer loop and extractor strategies the inner one,
so the paid route is only reached after every free one has failed on both.
That also stops a drained paid proxy from taking YouTube ingest down on its own
("Could not determine the video duration") while the statics are healthy.
Two smaller cuts on the same path: a user with no minutes left now gets its 402
before the probe instead of after it, and a failed route no longer dumps a
yt-dlp ERROR block per proxy per strategy into the API log (the watcher is what
reports a dead route).
The page opened with a TL;DR box, which is the wrong lead for a page
whose subject is a workflow: the canvas shows in one glance what four
paragraphs were describing. Screenshot in, summary box out, and the
TL;DR block in render.js is now optional so other pages can make the
same call.
Two nodes in act 3 sat on identical coordinates after the queue node
landed, so the template opened with overlapping labels on import.
The landing named n8n in the hero without linking anywhere; it now
points at the workflow page, in the app and in the crawler fallback
that has to mirror it.
Cloud keeps every user's connected accounts as profiles inside one
Upload-Post account, so the profile string is the only thing separating
'schedule to my TikTok' from 'schedule to a stranger's'. All three call
sites read `forced_profile or <client-supplied profile>`, which honours
the client's value whenever the server fails to resolve its own — one
resolver bug away from a cross-tenant write, and invisible in review
because the happy path looks identical.
resolve_post_profile() now refuses in cloud mode instead of falling
back, and never consults the client value there; self-host keeps
picking its own profile, since it owns the account behind the key.
Tests pin both behaviours and the profile filter on the scheduled-post
list, which is what stops one tenant reading or cancelling another's
queue.
/n8n-youtube-shorts-automation answers the two loudest unanswered asks
in the n8n community (a free/self-hostable clipper callable from a
workflow, and why posting video to TikTok/Instagram is so painful), and
gives the Reddit and forum posts a stable URL of ours to point at
instead of a raw file on GitHub.
Also drops the now-false 'there is no official n8n template yet' from
the automation page's body and FAQ, and links the two.
GET /api/social/scheduled lists the caller's pending posts and
DELETE /api/social/scheduled/{job_id} cancels one. Upload-Post's own
schedule endpoint takes no profile filter and returns the whole managed
account, so both filter by the caller's profile server-side — the same
multi-tenant trap as the impressions endpoint, and the reason cancel
404s instead of 403s on someone else's job.
The template picked its next daily slot from n8n workflow static data,
which two approvals tapped seconds apart both read before either wrote,
booking the same slot and publishing together (seen in a live run). It
now derives the slot from the server-held queue, which is shared state
and cannot race with itself that way.
Upload-Post's /total-impressions/{profile} echoes the requested profile
but returns account-wide numbers — a profile with zero posts got 85K
Instagram impressions — which for managed users leaks other tenants'
aggregates into the dashboard card and the analytics API. Aggregate the
post-analytics cache instead, which is correctly scoped by ?user=, and
keep the same response shape (total_impressions + per_platform).
Account page gains a 'Your posts' card: last-30-days impressions with
per-platform split and the top 3 posts by views, backed by the new
analytics endpoints. Hidden for free users (402) and until data loads.
The header profile selector was a no-op for managed users (exactly one
profile, nothing to switch) while displaying greyed-out networks with
no way to connect them — it now ends in a Connect / manage accounts
action that opens the branded Upload-Post connection page.
New openshorts-content-machine.json: daily channel-RSS watcher (one
video per day, new upload first then back catalog), clips delivered to
Telegram with approve/skip buttons, approved clips drip-scheduled via
/api/social/post, weekly analytics digest from the new endpoints. A 402
pauses the machine with a Telegram notice and leaves the video
unmarked so the next day retries it.
Both templates now carry webhookId on webhook-based trigger nodes:
without it n8n imports the node but never registers the webhook, so
every incoming call 404s. Found by importing and executing the
workflow against a live n8n.
GET /api/social/analytics (profile totals), /analytics/posts (per-post
cached metrics) and /analytics/impressions (windowed totals). Managed
users are locked to their own profile and rate-limited to 60/h in a
bucket separate from the metering probes; cloud without a plan gets a
clean 402 no_plan instead of a misleading missing-header 400. BYOK
keeps its own key and picks the profile with ?user=.
Found while browser-testing the editor: a clip without a start yet makes
ResultCard emit onPlay(NaN), and assigning that to currentTime throws in
a mount effect, taking the whole tree down to a black screen.
Only 2.7% of cloud users who pass through the social flow ever connect a
network (146 of 5,406 Upload-Post profiles), yet publishing from the app
is the strongest retention loop we have. Show a dismissible banner right
when the clips appear - the moment with the best odds - prompting managed
users with no connected network to open the hosted connect page.
Instrumented like the other conversion moments: SocialNudgeSeen (once per
job), SocialNudgeConnect, SocialNudgeDismissed (persisted in localStorage,
never shown again). Hidden automatically once any network is linked.
- The clip track's scale is now the rendered length instead of the
current total, so trimming a segment visibly shortens its bar; before,
a single-segment clip always filled 100% of the track and dragging its
handle appeared to move nothing.
- Playback boundaries are enforced by a per-frame rAF loop instead of
timeupdate (~4Hz), which let the preview overshoot a trimmed endpoint
by up to 250ms — the exact frame is what an end trim is judged
against. Hitting an edge also snaps currentTime back onto it.
- The transcript header now offers 'segment starts/ends here' actions on
the selected word, where the eye already is when choosing a cut point
from the text.
- Closing the editor mid-render is allowed and explained: the request
keeps running and onRerendered (functional setState in App) updates
the clip card after the editor is gone.
Prod 20-ago, 5 of 12 managed jobs failed and the alert said 'youtube
download' — no download had terminally failed. Three fixes:
- The quality probe now reports source duration, and /api/process rejects
sources under MIN_SOURCE_SECONDS (default 45, 0 disables) on all three
ingest paths with a clear message. A 24s YouTube Short cannot yield
15-60s clips; Gemini returns nothing and the job burns managed minutes
to die with 'no usable clips' (3 of the 5 failures, one user retrying
the same cat video).
- _job_error_text drops per-attempt download warnings when a later
attempt succeeded (HD-direct fails on every job since the server IP
ban; static proxies recover it), and gained an 'Error:' marker so
raised exceptions (RuntimeError:, GeminiBlockedError:) reach the alert
instead of a bare 'Traceback ... exit code 1'. The classifier names
'no clips found (user video)' as its own content-shaped category.
- (env, no code) DIRECT_FIRST=0 in prod: with the server IP banned the
direct attempt only added ~10s and the noise behind these alerts.
Issue #68: publishing a video to YouTube from the Studio now offers
'create clips from this video'. /api/process accepts a
thumbnail_session_id, hardlinks the session's source under the job's
name (so /api/source, the clip editor and retention treat it like a
normal upload) and forwards the session's transcript via a new
main.py --transcript flag, so the pipeline skips a second Whisper pass.
Any problem with the forwarded transcript (missing file, no segments,
silent source) falls back to transcribing normally, and empty
transcripts are not forwarded at all. Contract pinned by six endpoint
tests plus a fallback case; verified end to end locally against the
running app (speech video: 'Reusing precomputed transcript (4
segments)' in the job log).
Issue #46 round two: the 1h sweep kept deleting finished projects under
self-hosters who never touched their env. The disk is already bounded by
OUTPUT_MAX_GB / UPLOADS_MAX_GB, so age can afford to be generous. Cloud
keeps the tight default because clips are archived to R2 on completion.
The results panel now tells self-host users how long their clips live
and which env var controls it, and the restorable-session window follows
the new default.
YOLO_MODEL_PATH stays available for deployments that need it, but the
image no longer sets it, so the default behavior is identical to what
every existing deploy already runs.
Adds YOLO_MODEL_PATH (default unchanged) and bakes the weights into
/tmp/Ultralytics in the image so a volume mounted over /app can't shadow
them, plus removes the redundant top-level scenedetect import.
Adapted from #47 by @kayceepeece, minus the CPU-only torch pin which
would conflict with the GPU production build.
The ShortVideo Composition hardcoded durationInFrames/fps/width/height
from DEFAULT_PROPS. Since there was no calculateMetadata callback,
selectComposition()/renderMedia() in render-service ignored whatever
durationInFrames/fps/width/height was actually passed in inputProps at
render time, always producing a fixed 900-frame (30s) 1080x1920 output
regardless of the real clip length.
Verified: rendered with durationInFrames=300 (10s) before this fix
produced a 30s file (base video frozen on its last frame for the
remaining ~20s). After adding calculateMetadata, output duration
matches the requested frame count exactly.
The v1 frame loop has been the rarely-taken fallback since the v2 engine
shipped in July; give it the same shape as the rest of the file while it
sticks around as the REFRAME_ENGINE=v1 rollback:
- get_video_resolution releases its capture in a finally block
- staging files named .v1video/.v1audio next to the final output, cleaned
with one loop instead of three inline conditionals
- the rawvideo pipe spells out demuxer options (-video_size/-framerate/
pipe:0) instead of the short aliases, and drops the redundant -vcodec
- encoder/reader names instead of ffmpeg_process/cap; single -c copy mux
command built by list concatenation
- dead script_start_time assignment removed
Behavior is unchanged: verified end to end with REFRAME_ENGINE=v1 on a 6s
clip (180 frames, 1080x1920 h264+aac, faststart, scrubbed metadata).
The existing test's words all sat inside the removed ±45s window, so it
passed with or without the change. Add words starting 160s after the clip
ends: the old windowed code drops them, the new contract ships them. Also
assert the words arrive sorted by start time, which the editor's
follow-along binary search depends on.
The hero now pitches the agent audience too: 'also a clipping tool for ai
agents: claude, chatgpt and n8n drive it over mcp', linking to /mcp. Same
sentence added to the crawler-visible fallback copy (landing-fallback.js
must stay in sync with Landing.jsx).
Business decision: the reminder email will not be implemented for now, so
the Terms must not contractually promise it — a broken written promise is
worse than the underlying statutory ambiguity. Renewal terms now state
auto-renewal until cancellation, cancellable anytime from the account.
(The art. 97.1.p TRLGDCU obligation from Ley 10/2025 still exists for
Spanish companies; revisit if enforcement picks up.)
Replaces the single thin Terms & Privacy SPA view with six indexed static
pages (/terms /privacy /legal-notice + /terminos /privacidad /aviso-legal)
built like the SEO pages, in the sitemap and llms.txt but out of the
marketing interlinking ring. The #legal SPA route becomes a hub linking to
them, so the text lives in exactly one place. Footer and the rights-
attestation checkbox now link to the real documents.
Drafted from a clause inventory of OpusClip/Klap/Vizard/Submagic legals
plus a 2026 Spanish/EU compliance review. Notable substance:
- LSSI art. 10 identity (TONVI TECH SL, Málaga) — was missing entirely.
- Rights warranty covers URL-instructed downloads explicitly and declares
the attestation record (IP+UA+date) as evidence; DSA arts. 11-17
notice-and-action with repeat-infringer policy.
- Explicit output ownership (clips are the user's; free-tier watermark as
a written licence condition) and a no-AI-training commitment naming
Gemini/ElevenLabs/Whisper — clauses none of the competitors have.
- EU withdrawal per CJEU C-234/25: SaaS is a digital service, the 14-day
right survives with pro-rata payment (not the digital-content forfeit
the old page used); renewals do not reopen it. 15-day renewal reminder
duty (Ley 10/2025) stated.
- AI Act art. 50: dubbed clips declared as labelled/marked; users must
not strip marks.
- Privacy: per-purpose legal bases, named processors, DPF+SCC transfers,
real retention (7-day free clips, sub+7 days paid — matching
cloud/config.py), AEPD analytics exemption documented, no cookie
banner rationale.
- Spanish versions with prevalence clause (art. 60.1 TRLGDCU; AEPD has
fined foreign-language-only policies). renderPage supports page.lang.
Turns the clip editor into a three-point editing surface: mark in/out on
the source, send the range to the clip, and scrub the result — with the
timeline honest about which parts of the edit the last render can already
show.
- Chrome: the source track ignored drags entirely. Without preventDefault
the gesture became a text selection and then a native drag, which
swallows every later pointer event and shows the not-allowed cursor.
- The source track's block is draggable (body moves, edges trim) and every
gesture on it scrubs the source monitor, so a cut is chosen against the
picture rather than against numbers.
- Three-point editing: mark in / mark out (i / o) off the monitor's
playhead, then "replace #N" (.) or "insert after #N" (,). Dragging empty
track marks a range instead of silently appending a segment.
- /edl ships the whole source transcript instead of a ±45s window: a cut
can only be extended into words the editor was sent. The panel shows all
of it, follows playback, and seeks the monitor on click.
- Layout: source monitor + its track + transcript | clip preview + its
track | controls. Each track sits under the video it drives.
- The clip timeline works while edited. A cut that only removes material
keeps nothing but frames the last render already produced, so it stays
scrubbable and playable; only material the render never saw is marked
red, and the playhead — now a solid handle — stops at its edge.
Transcript words render in memoised 50-word slices: repainting a couple of
thousand of them costs ~66ms, and timeupdate fires four times a second.
New STATIC_PROXY_URLS env (comma-separated): dedicated ISP IPs with
unlimited traffic, tried after the direct attempt and before the per-GB
paid proxy. With it unset the chain is byte-identical to before.
- plan_download_attempts: pure, unit-tested attempt ordering. Cheapest
bandwidth first: direct -> statics (rotated per job, uncapped 1080p,
free bytes) -> paid HD (720p cost cap) -> fallback via paid.
- The 720p cap and the PROXY_BYTES monthly counter now apply ONLY to
attempts that actually bill per GB — static downloads come in at 1080p
and don't count toward the cost alert.
- alerts.py watcher generalized to multiple targets: the static pool
(down = ingest silently moves to per-GB billing, nag with a cost hint)
and the paid proxy (down = ingest at risk), each with its own
down/nag/recovered incident state.
Context: the server's IPv4 is hard-banned by YouTube (19-aug-2026), so
DIRECT_FIRST serves nothing and every download was going through
DataImpulse at $1/GB capped to 720p. Verified from prod: all 3 Decodo
dedicated IPs pass the bot-check with cookies+bgutil at 1080p.
HTTPS through DataImpulse fails in httpx with an SSL record-layer error
even when the proxy is healthy (verified against a working proxy right
after the top-up; yt-dlp's stack tunnels the same proxy fine), so an
HTTPS probe would report a permanent false outage. An exhausted balance
rejects the request at the proxy before forwarding, so plain HTTP still
catches the 407.
The residential proxy ran out of traffic (407 TRAFFIC_EXHAUSTED,
19-aug-2026) and every YouTube-URL job failed with only easy-to-miss
one-shot alerts. Now:
- cloud/alerts.py: a background watcher probes the proxy every 30 min
(generate_204, a few bytes of paid traffic). On failure it alerts
immediately, re-alerts every 2 h while the proxy stays down, and sends
a recovery confirmation when it answers again — so exhaustion is caught
even before the next user job fails.
- record_job_outcome: a proxy-classified job failure also opens the
incident, so job-driven detection and the probe share one state.
- app.py: the watcher starts from the lifespan in managed mode.
- tests/test_proxy_watch.py: state machine (first alert, renotify window,
recovery + reset, job-error trigger).
- test_hooks.py: the 6-style contract the frontend mirrors (boxed vs
outline), fixed-bitmap emoji rescaling (_emoji_scale/_measure_width),
and create_hook_image rendering every style (emoji included) with the
unknown-style fallback.
- test_hook_layers.py: _strip_burned_hook walk-back (hooked_/legacy hook_,
missing-file stop), the two-step subtitled->hooked->clean strip /api/hook
replaces through, and _canonical_clip_file resolving hook chains with
newest-derivation-wins.
The auto-hook was burned into the canonical clip in place, so editing the
hook stacked a second overlay on top of the first. Hooks now follow the
exact derivation pattern captions use:
- main.py: auto_hook_clip writes hooked_<ts>_<clean>.mp4 next to the clean
canonical instead of mutating it; captions burn on top of the hooked file
(subtitled_<ts>_hooked_<ts>_<clean>). Watermark moves BEFORE the hook so
the branding lives in the canonical and survives hook replacement.
- app.py: _strip_burned_hook walks hooked_/legacy hook_ prefixes back like
_strip_burned_captions; /api/hook strips captions AND the old hook before
burning, so a new hook always REPLACES the previous one. New remove flag
strips the hook entirely (captions re-applied, no metering). Burned hook
recorded/cleared in clip metadata (auto_hook key) and returned as
burned_hook. _canonical_clip_file resolves hooked_*/hook_* derivations.
- cloud/videos.py: archive the hooked_ intermediate of a captioned hook so
restored projects keep the walk-back chain editable.
- ResultCard: stripBurns knows hooked_<ts>_ (the Remotion preview now
composes over the truly clean clip — no more stacked preview), burned
hook tracked in state, remove handler wired to the modal.
- HookModal: warning now says replace, plus a 'remove hook from clip'
action when one is burned.
Auto-hook (opt-in per job, dashboard default ON):
- /api/process accepts auto_hook + auto_hook_style; absent means off, so
API/MCP/webhook callers keep byte-identical output.
- main.py auto_hook_clip burns each clip's viral_hook_text (Gemini already
produced it, it was only used to pre-fill the modal) into the canonical
clip in place — after reframe, under watermark and captions — so every
derived-name convention (subtitled_/recut_ walk-backs, R2 archive,
restore) keeps working untouched. Fail-open like auto_caption_clip.
- Burned hook recorded as clip.auto_hook in metadata; the hook modal warns
before stacking a second one.
- MediaInput: 'auto hook titles' toggle + style select in advanced options,
persisted in localStorage.
Emoji that actually render:
- Gemini prompt now asks for 1-2 emojis in viral_hook_text.
- Dockerfile installs fonts-noto-color-emoji — without it prod silently
stripped every emoji (no candidate font existed in the image).
- hooks.py supports fixed-bitmap color fonts (NotoColorEmoji only loads at
its 109px strike; Apple Color Emoji at 160): glyphs render at native size
and are Lanczos-rescaled to the text size instead of being treated as
unavailable. macOS system font added for local dev.
Editor polish:
- HookModal persists last style/position/size/entrance (always reset to
classic before, which read as the picker being broken).
- Remotion preview positions aligned to hooks.py (top 20%, bottom 70%).
- Warning when a bottom hook will overlap burned/preview captions.
- Entrance-animation control greyed out with a note when the clip
re-renders on the server, where the hook is static.
d94e126 added the 6 hook styles to hooks.py (server FFmpeg path) and to the
HookModal picker, but never to the Remotion composition — which is what
renders both the modal preview and the final clip on the primary in-browser
render path. Picking dark/yellow/red/outline still produced the white
classic card.
- HookOverlay.tsx: HOOK_LOOKS map mirroring hooks.py HOOK_STYLES (box color,
text color, outline stroke, shadow), applied via config.style.
- types.ts: HookStyle type on HookConfig and hookConfigSchema (default
"classic" so older payloads keep validating).
transcript_words() strips each word, so the remapped transcript handed to
the caption generators lost the leading-space convention the block
collector uses as its word-boundary signal — every recut/reframe with
re-applied captions burned the whole line glued together
("...creesycambiatodo"). Latent since the clip-editor merge; surfaced by
the first caption burn over a recut with real words.
transcript_words() strips each word, so the remapped transcript handed to
the caption generators lost the leading-space convention the block
collector uses as its word-boundary signal — every recut/reframe with
re-applied captions burned the whole line glued together
("...creesycambiatodo"). Latent since the clip-editor merge; surfaced by
the first caption burn over a recut with real words.
- Meter the re-render: /api/clip/reframe now reserves/commits/releases
minutes exactly like a source-path /rerender — it is the same GPU work,
and it was free and uncapped.
- Re-apply captions by default (reapply_captions param to opt out): every
default clip ships with burned captions, and the reframe silently
returned caption-less files.
- Read metadata.json INSIDE the per-job lock (same _reframe_locked shape
as /rerender): the read-outside/write-inside window let a concurrent
rerender's recipe get clobbered by a stale write.
- Interplay with whole-clip framing: recipe.framing keeps forcing its
layout on the scenes the user did not hand-position (apply_crop_overrides
runs after force_strategy, so per-scene wins where named), and the
recipe is preserved through the reframe instead of being rebuilt bare.
- /rerender clears stale crop_overrides: scene indices only mean anything
against the cut they were made for, and the trim render does not apply
them — leaving them made /scenes reopen showing overrides that would
land on the wrong shots.
- /scenes: entitlement-gated (it cuts, scene-detects and encodes on every
open), serialized per job (stable output names tore under concurrent
opens), 400 on horizontal jobs, real aspect for square jobs, temp_
prefix on preview/thumbnails (kept out of the self-host S3 backup),
faststart + timeout on the preview encode.
- Tests for all of it plus the apply_crop_overrides math the PR described
but did not include (12 new, suite at 502).
Conflicts were the parallel override parameters: render_clip /
process_video_to_vertical / reframe_v2.render / perform_recut now carry
BOTH force_strategy (whole-clip framing, main) and crop_overrides
(per-scene manual framing, PR #70). The v1-fallback safety net now also
raises for force_strategy, which had the same silent-revert hole the PR
fixed for crop_overrides.
Addresses the UX half of #67: with no retained source the editor clamps
cuts to the original clip range but never said why, reading as a bug. A
note in the segments panel now names the reason and that newly processed
videos keep their source.
Fixes#69. The subtitle modal lets the user edit the caption text, but the
edits only traveled through the in-browser Remotion path; the FFmpeg path
(taken by every karaoke style and by any clip with server burns, i.e. all
clips with default captions) sent style params only, so the server
regenerated from the stored transcript and silently discarded the edits.
/api/subtitle now accepts an optional 'words' list (clip-relative ms, the
same shape the /transcript endpoint serves) and builds a synthetic
transcript from it, so both the SRT and karaoke ASS generators burn the
edited words verbatim. Words get Whisper's leading-space convention so the
block collector keeps their boundaries. The modal sends them only when the
text actually differs, and never on bulk apply-to-all (edits are per-clip).
Verified live: an edited 5-word line burned exactly as typed, correctly
grouped into blocks.
The reframe engine picks the crop automatically and is right most of the
time. When it is wrong it is badly wrong, and there was no way to say
"no, frame it here".
The unit is the SCENE, not the clip. A podcast cuts between a fixed close
camera and a fixed wide one, and the right crop differs per camera; scene
boundaries already are those camera changes. Scenes the user never touches
keep the automatic camera, so correcting one bad shot cannot spoil the
shots the tracker got right.
Backend:
- reframe_v2.apply_crop_overrides() replaces a scene's slice of the camera
trajectory with a constant and forces it to TRACK, so a scene the
classifier had sent to GENERAL comes back to a vertical crop. It runs
after every automatic pass, including the ALTERNATE writes, so a manual
choice always wins.
- A scene can also be split by hand: the override writes straight into
`splits`, which means the user can stack a scene the detector never
proposed, with no dependency on SPLIT_LAYOUT being enabled.
- GET /api/clip/{job}/{i}/scenes returns the scenes with a frame from the
UNCROPPED cut plus a light preview with audio, and suggests a centre from
the largest face in each shot.
- POST /api/clip/reframe re-renders with the clip's cut untouched. It is
deliberately separate from /api/clip/rerender: a scene index only means
something against a given cut, so letting framing ride along with a trim
save would move every override onto the wrong shot.
- render_clip raises instead of falling back to the v1 engine when manual
framing is present, since v1 ignores it and would silently return an
automatically framed clip.
Frontend:
- ReframeEditor lists the scenes, each with the source frame, a draggable
9:16 window, and a play button that plays that scene from the preview so
the user can hear who is talking before choosing.
- Saved overrides are loaded when the editor reopens. Without that the next
save would discard every earlier adjustment, because a re-render rebuilds
from source using only what it receives.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The scene classifier only counts faces, so a screencast-style video with a
presenter in frame gets TRACK and the crop eats the slide (the SCREENCAST/
WIDE detectors sit behind the opt-in layouts=auto flag). The clip editor now
has a framing selector that pins every scene's layout: 'full' renders the
whole source frame (WIDE: no side-crop, blurred bands), 'track' forces the
subject-tracking crop, 'auto' returns to the classifier.
Plumbed as force_strategy through reframe_v2.render -> render_clip ->
perform_recut -> /api/clip/rerender (and the recut_clip MCP tool). A
non-auto choice always re-reframes from the retained source (409 without
it) and persists in the clip's recipe, so later plain trims inherit the
look instead of silently reverting; an explicit 'auto' resets it.
Verified live: framing=full on a TRACK-cropped clip re-rendered with the
full frame visible edge to edge (125s source path), and the editor reopens
with the persisted choice preselected.
The detail prompt keeps clips inside their candidate window, so the default
90s scoring windows silently capped user-requested long clips (a 60-90s band
barely fit, anything above did not). Windows now grow to 1.5x the requested
max length; the default band keeps the exact old behavior.
/api/process (and the process_video MCP tool) now accept optional
target_clips (1-15) and clip_min_seconds / clip_max_seconds (5-180),
surfaced in the dashboard as a collapsed 'advanced options' section.
Blank means the AI decides, keeping the default request byte-identical.
Plumbed through the same env overrides the A/B harness already reads:
CLIP_TARGET_MIN/MAX (existing) and a new clip_duration_bounds() in
clip_selection.py backing CLIP_MIN_SECONDS/MAX_SECONDS. The detail and
visual prompts take the band as template placeholders instead of the
hardcoded 15-60, and word-snapping enforces the same bounds. All three
knobs are honest targets, not guarantees: the model still returns fewer
clips when the material doesn't hold them, and the UI copy says so.
Verified live: target_clips=2 + band 8-15s on the demo video returned
exactly 2 clips of 13.3s and 13.7s (the uncontrolled run gave one 41.7s
clip); out-of-range values 400 with a named reason.
- A recut clip's start/end are the covering source range, so end - start
showed a 20s two-segment clip as minutes long; duration now sums the
recipe segments when present.
- Drop the clip's durable R2 URL after a rerender: archive_clip_edit
deletes the superseded object, so the stale URL would 404 as the
playback fallback.
The clip editor's fast path (and /api/subtitle re-styles) cut from the
clean canonical file, but archive_job only uploaded the served derivative,
so every project restored from R2 after a redeploy 409'd on rerender even
for in-range segments. Archive the clean canonical alongside the served
file; restore already downloads everything under the job prefix. The
free-retention purge now deletes the whole job prefix so these extra keys
(and previously leaked derivatives) can't become orphans.