Skip to content

feat: preserve narration and write SRT/VTT captions (#3) - #11

Merged
codeonym merged 2 commits into
mainfrom
feat/3-narrated-transcript-and-captions
Nov 10, 2026
Merged

codeonym merged 2 commits into
mainfrom
feat/3-narrated-transcript-and-captions

Conversation

@codeonym

Copy link
Copy Markdown
Contributor

Summary

flow-reel record demo.ts now preserves each step’s original narration and writes SRT/WebVTT captions beside the silent MP4, using the final calibrated video timeline.

 record demo.ts
   demo.mp4
-  demo.transcript.json: step timings
+  demo.transcript.json: original narration + step timings
   demo.events.json
+  demo.srt
+  demo.vtt

One cue covers each step’s recorded boundaries. Captions normalize whitespace, let players wrap text, escape markup, and skip blank or zero-duration cues. Schema version 1 still accepts older transcripts without narration.

Evidence

  • Before: the new recording test failed because every step’s narration was undefined; subtitle files were absent.
    After: both recording runs preserve narration, and ffprobe reads SRT cue boundaries matching each transcript.
  • npm run typecheck and npm run build: passed.
  • npm test: 45 passed.
  • npm run test:e2e: 6 passed, including Chromium’s native WebVTT parsing, literal-text and active-cue playback checks, plus existing resolution, ±150 ms repeatability and two-frame alignment checks.
  • Visually inspected the playback screenshot with literal markup, symbols and Unicode captions. Standards and specification reviews found no issues.

Merge Danger

Door: two-way

Blast Radius: recorder

Adds caption sidecars and narration fields; recording timing and silent MP4 behavior remain unchanged. Some SRT players display escape sequences rather than decoding them; the README documents this limit. WebVTT preserves literal text.

Closes #3

@codeonym
codeonym merged commit 108af29 into main Nov 10, 2026
1 check 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.

Narrate steps in the transcript and write SRT/VTT captions

1 participant