Spaces:
Running
Running
Commit History
-
Add an Avatar swap page that puts a library avatar into any uploaded video, in segments, keeping its sound
MiniMax H3 Max Recast on fal replaces the person in existing footage while keeping motion, camera, timing and soundtrack. Videos over 15s go up as 15s segments with one seed and are stitched back; the source audio is laid over the result. The editor's Clip tab gets the same swap for one clip. The reference upload gains a keep_audio option because it stripped sound before the swap could see it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>36c7c8a
-
Stop paying twice, measure every run, and make the picture, voice and props hold up
Spend and reliability: identical paid requests reuse the running job, every paid button shows a price and asks first, uploads no longer block the server, job status comes from the database, and the synchronous video endpoint is gone. Measurement: every model call logs tokens and cost, generations and renders carry a cost, and an eval runner replays saved briefs without touching the DB. Platform: vector search over the whole library (pgvector HNSW), one image that runs as api, worker or both, persistent Redis, TLS for external Redis, and a production guard that refuses local media. Scripts and judging: a hard spoken-word budget, no fragment sentences in continuous mode, a fixed Gemini judge on every run, ad-policy checks, and hooks drawn from the brain or the research with no opener steering. Video: a render critic that reviews every clip and re-renders the bad ones, takes planned to land within 10% of target, portraits checked before any paid animation (no more grid presenters), th…13354e2
-
Ground generation in the real schema, and tune pace against reference ads
Two reference ads were torn down shot by shot and measured. Ours ran 4.4s average shots with 15% dead air; they ran 2.6-3.7s with 0-11%. Everything here follows from closing that gap and from writing the database schema down next to the code that reads it. Pace and dead air - Only the last VOICED clip holds a beat now. SPEECH_TAIL_SECONDS was paid on every clip, which put ~0.7s of silence on each cut: 7.4s of a 48s ad. - presenter_max_seconds (6s), separate from the model's 15s per-clip ceiling. The two were the same value, which is exactly why the longest shot measured 15.0s — the model's limit standing in for an editor's. - split_overlong_scenes cuts a long monologue into several shots. Moving surplus words to a neighbour cannot converge: the last scene has no forward neighbour, so it pushes them back and the pass ping-pongs. Latent at a 15s cap, guaranteed at 6s. Replay of the shipped ad: 11 shots -> 14, avg 4.27s -> 3.36s, longest 15.0s -> 5.1s. The hook decides its…6272eef
-
Make the tabs, disclosures and controls reachable by keyboard
Measured the palette first: it is in good shape (chalk 14.6:1 on slate, gaffer 8.5, viewfinder 6.8), and focus rings, reduced-motion and press feedback were already there. What was missing was structural. - The three view tabs were plain buttons: nothing announced them as a set, nothing said which was selected, and Tab walked through all three before reaching the panel. Now a real ARIA tablist with roving tabindex, so the strip is ONE tab stop and left/right moves between tabs. - Disclosure buttons carried no aria-expanded — the +/- glyph was the only state signal, invisible to a screen reader. The glyphs are aria-hidden now that the button announces itself. - No landmarks at all, so assistive tech had no way to skip the header into the content. Added <main> and a skip link. - The editor's 3x3 position grid conveyed the selected cell by fill colour alone; it now carries aria-pressed and a real label per cell. - A 32px min-height floor on buttons: the compact uppercase la…19955ca
-
Re-record the voiceover when captions are edited
Editing a caption changed only the burned-in words. The voice went on saying the original line, so the finished ad contradicted itself on screen — the one failure mode where the caption feature actively made the video worse. The editor now detects when a clip's cues have drifted from the words it speaks and offers to re-record. `revoice_clip` keeps the existing footage and replaces only the audio: one TTS call plus a mux, seconds rather than the minutes a video regeneration costs. The hard part was a line LONGER than the clip it was written for. `mux_clip_audio` sets the output length with `-t`, so the container came out the right duration with no video in the tail — measured at 100 of the 188 frames a 7.5s clip needs, i.e. 3.5s of nothing. `hold_last_frame` pads the video with a cloned final frame instead, which reads as a held beat; black would read as the video having broken. Existing callers trim to min(video, audio) and never reach it, so their output is unchanged. A split clip…953636e -
Size burned-in text against a reference frame; animate its arrival
The size bug was not a bad default. Seedance renders 720x1280 and stitch_clips scales to HEIGHT 720, which on portrait footage produces a 406px-wide output — so the default 52 "px" caption was 13% of the frame width, wrapping a four-word cue into a wall of giant stacked text. Sizes are now quoted against a 1080-wide reference frame and scaled to whatever the real frame is, so one number means the same thing everywhere: measured at ~4.9% of frame width across 1080/720/540/406, and a cue box that went from overflowing to 60% of the width. frontend/src/components/editor/preview.ts mirrors the same reference width, and deliberately keys off the PREVIEW's width rather than the source clip's: the editor previews 720-wide clips while the export is 406 wide, so anything derived from the source would disagree with the finished video. overlayStyle's `scale` argument is gone — it was that source-derived number. Animated text: TEXT_ANIMATIONS gives each box an alpha ramp in and out — `fade` (0.2…ea3084e
-
Add background-job tracking; rebuild editor placement, split and trim
Editor - Text (captions and titles) is now placed by dragging it on the frame. `x`/`y` are frame fractions addressing the box's centre, clamped so a box dragged to an edge stays fully on screen. The `position` presets still apply when they're absent, so the render pipeline's own captions and older payloads are unaffected. Placement is computed in Python rather than as an ffmpeg `overlay=x=...` expression: those need commas, and comma escaping inside a filtergraph differs between ffmpeg builds. - Split at the playhead. Both halves keep the same manifest index, so the export trims one source file twice and nothing is regenerated. The spoken line is divided with the cut (EditClip.spoken) or both halves would be captioned with the whole sentence; titles anchored past the cut re-anchor to the second half. - Trim by dragging a clip's edges, with the playhead parked on the exact frame being dragged to. Undo/redo over clips, titles and caption edits, with a drag coalescin…9d66133
-
Composite the editor preview in the browser so edits show up live
The preview was a single <video> whose src was swapped per clip, so every cut re-fetched from the CDN and stalled, and captions/titles/music existed only in ffmpeg at export — you styled a caption and saw nothing until a multi-minute round trip. Now the playhead (global timeline seconds) is the single source of truth: one <video> per clip stays mounted and preloaded and only the active one is shown, so playback is gapless; captions and titles are drawn as DOM boxes using the export's own geometry (preview.ts mirrors _render_overlay_png and _OVERLAY_Y, scaled by previewWidth/videoWidth); music previews through a synced <audio>. The timeline scrubs on click/drag and space toggles playback. Fixes three ways an edit could silently corrupt: - Caption edits were keyed by array index, so reordering or trimming a clip moved hand-edited text onto different words. Cues now carry a stable clip-key#ordinal identity. - Titles held absolute timeline seconds while trims moved the timeline under …a7ec099