Skip to content

feat: Add Captions/Subtitles Support with Custom Styling Options #991#1187

Open
Rucha0901 wants to merge 8 commits into
magic-peach:mainfrom
Rucha0901:feature/subtitles-support
Open

feat: Add Captions/Subtitles Support with Custom Styling Options #991#1187
Rucha0901 wants to merge 8 commits into
magic-peach:mainfrom
Rucha0901:feature/subtitles-support

Conversation

@Rucha0901
Copy link
Copy Markdown
Contributor

Description

This PR adds complete support for uploading, previewing, and burning in captions/subtitles from .srt files directly within Reframe.

  • SRT Parsing Module: Implements a robust .srt parser (src/lib/subtitles.ts) supporting time range parsing, multi-line blocks, and alternative punctuation.
  • Typography & Styling Controls: Added sidebar controls in SubtitleControls.tsx for Font Family, text color, scale size, and background style presets.
  • Readability Styles: Support for Plain Text, Black Outline (utilizing professional paintOrder styling to avoid fill bleed), Translucent Background Box, and Drop Shadow.
  • Synchronized Playback Preview: Overlays real-time, responsive subtitles on the video canvas scaled proportionally to the current preview container size.
  • Word-Search Segment Navigation: A scrollable segment list in the sidebar that allows users to search captions and click a segment to seek the player directly to that time.
  • FFmpeg Web Worker Burn-in: Integrates dynamic drawtext filters with enable='between(t, start, end)' inside the background ffmpeg.worker.ts Web Worker during export. This avoids WebAssembly -vf subtitles core crashes and guarantees offline burn-in reliability.

Related Issue

Closes #991

Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • GSSoC contribution

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@Rucha0901 is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Rucha0901!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

✅ PR Format Check Passed — @Rucha0901

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor gssoc'26 GirlScript Summer of Code 2026 labels May 25, 2026
@Rucha0901
Copy link
Copy Markdown
Contributor Author

@magic-peach ,check the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GirlScript Summer of Code 2026 level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Captions/Subtitles Support with Custom Styling Options

1 participant