Skip to content

Add intro and outro clips to the note video export - #199

Merged
davior merged 1 commit into
mainfrom
claude/festive-bohr-yust2d
Oct 4, 2026
Merged

davior merged 1 commit into
mainfrom
claude/festive-bohr-yust2d

Conversation

@davior

@davior davior commented Oct 4, 2026

Copy link
Copy Markdown
Owner

What

The Generate video dialog gets a new Intro & outro tab. You can upload one clip to play before the title screen and another to play after the last section.

  • Each clip plays whole, with its own sound. A clip with no audio track gets silence. It is fitted to the frame the same way as any video in a note, so a 4:3 or 9:16 clip still works in a 16:9 render.
  • Nothing of the render is drawn over a clip: no watermark, overlay text or waveform. In "title + chapter" overlay mode, the chapter line never shows "Intro".
  • The background music starts after the intro and stops before the outro. Fades happen at those edges, and ducking still works.
  • Transitions still join the clips to the rest of the video (cuts, dips and crossfades).
  • Each clip gets an Intro / Outro chapter marker in the MP4.
  • The poster frame comes from the article, not the intro.
  • The dialog's length estimate includes the clips.
  • If a clip is missing, isn't a video, or belongs to another user, it is skipped with a warning on the job instead of failing the render.

Persistence / storage

  • Clips are uploaded into the user's own media folder (/media/{user_id}/…), not into the note. They're meant to be reused on every video.
  • The dialog's options are now saved to the account as the video_render_options user setting (debounced 800 ms, and flushed when the dialog closes), as well as to localStorage. They now follow the user to other browsers. The account copy wins when it exists; otherwise the dialog falls back to the browser's older local copy. Just opening the dialog never writes, so a stale local copy can't overwrite what another device saved.
  • Files a saved setting points at count as in use. settings_media_filenames() feeds both file_is_referenced() and the unlinked-file sweep. Without this, the unlinked-file sweep would have offered the intro and outro (and the existing watermark icon and music track, which already had this problem) for deletion. Once a clip is removed in the dialog, the sweep offers it again.

Testing

  • Backend: pytest gives 1138 passed (22 new):
    • segmenter: the clips wrap the article; switching one off, missing files, other users' files and still images are all handled; an empty note stays empty
    • music-window filtergraph
    • full render() through a fake ffmpeg (test_video_bumpers.py): no overlays or waveform on a clip, music window, chapters, poster time, crossfade timing
    • settings-referenced files are kept by the unlinked sweep and by asset deletes
  • Real ffmpeg render with a 4:3 intro that has sound and a 9:16 outro with no audio track, under cut, dip and dissolve. All three produce valid MP4s with Intro/Outro chapters. Measured audio shows no music under either clip. The extracted frames show the clips fitted with nothing drawn over them, while the article keeps its watermark, overlay and waveform.
  • Frontend: tsc --noEmit, vitest (190 passed), npm run build.
  • Browser (Playwright, Vite + uvicorn): uploaded an intro and checked it was saved to /api/settings with its URL and filename. After a reload with the local copy cleared, the dialog still showed it. The unlinked scan didn't list it while it was in use and did list it after Remove. No page errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UbALFUcK5VxpopwohSkG7N


Generated by Claude Code

The Generate video dialog gets an "Intro & outro" tab: upload a clip to play
before the title screen and another after the last section. Each plays whole
with its own sound (or silence), fitted to the frame like any other clip, with
nothing of the render drawn over it — no watermark, overlay text or waveform —
and the background music bed now starts after the intro and stops before the
outro. Each clip gets its own chapter marker, and the poster frame is taken
from the article rather than the intro.

The dialog's options are now saved to the account (the `video_render_options`
user setting) as well as this browser, so they follow the user to any device.
Media a saved setting points at — the intro and outro, and the existing
watermark icon and music track — counts as in use, so the unlinked-file sweep
and asset deletes no longer treat those uploads as leaked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UbALFUcK5VxpopwohSkG7N
@davior
davior marked this pull request as ready for review October 4, 2026 02:36
@davior
davior merged commit 0daab2f into main Oct 4, 2026
2 checks passed
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