Repository navigation
feat(desktop-gpui): download captions as SRT or WebVTT - #4247
Open
richiemcilroy wants to merge 5 commits into
Open
richiemcilroy wants to merge 5 commits into
richiemcilroy wants to merge 5 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
richiemcilroy
marked this pull request as ready for review
November 14, 2026 06:32
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
# Conflicts: # apps/desktop-gpui/locales/de.toml # apps/desktop-gpui/locales/en.toml # apps/desktop-gpui/locales/es.toml # apps/desktop-gpui/locales/fr.toml # apps/desktop-gpui/locales/hi.toml # apps/desktop-gpui/locales/ja.toml # apps/desktop-gpui/locales/zh-CN.toml # apps/desktop-gpui/src/i18n/editor_shell_surface_tests.rs # apps/desktop-gpui/src/transcript/view.rs
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Download the captions as a subtitle file: the download button in the Transcript tab offers SubRip (
.srt) and WebVTT (.vtt), timed to the edited video.Screenshots
Linux under Xvfb at 1600x1000, debug build of #4245, #4246 and #4247 combined, on a 52 s recording with a word-timed transcript. The real editor is driven with xdotool and recorded with ffmpeg (probe run). Screen recordings: light, dark.
Files the run saved through the file chooser: captions.srt, captions.vtt. They carry the corrected word ("misheard.") and the two hand-added captions (cues 4 and 5). Cue ends sit about 0.15 s after each caption's end, the fade-out this PR includes.
macOS still (the download button (SRT / WebVTT) in the Transcript header):
How it works
TranscriptPage.tsx,captions-export.ts). The GPUI editor had no way to get captions out except burned into the video.cues(src/caption_export.rs) reads the caption track the renderer draws, which is already projected through cuts, clip speeds, transitions and fullscreen holds, and shapes it the wayfind_active_caption_segment(crates/rendering/src/layers/captions.rs) shows it:MAX_CAPTION_WORD_DURATIONafter its last word starts, then fades out for its fade duration; the cue runs until the fade ends unless another caption takes over firstfind_active_caption_segmentpicks it. A caption interrupted by another becomes two cues, and one that is never on screen is left out&,<and>(which also covers-->). SubRip has no escaping and is written as is.ToolbarMenu::CaptionDownload,src/editor_window.rs) and the same save panel and file naming as video export (export_file_name, nowpub(crate)). It is enabled whenever the caption track has captions, with or without a transcript. The file is written off the main thread, and the result shows as an editor notice.Callers checked
export_file_name: only its visibility changed; video export still calls it the same way.ToolbarMenu: every match (toolbar_menu_items,choose_toolbar_menu,render_toolbar_menu) handles the new variant. Aspect ratio and preview speed are unchanged.What could regress
Tests added
src/caption_export.rssrt_and_vtt_are_written_to_speccue_text_never_breaks_a_cue_and_keeps_unicodeoverlapping_captions_keep_the_one_on_screenthe_earlier_caption_in_the_track_wins_even_when_it_shows_latera_fade_out_lasts_until_the_next_caption_or_its_own_lengthhidden_fillers_and_word_lingers_match_the_renderertimings_follow_cuts_speed_and_holds_of_the_edited_videotwo_hours_of_captions_export_quickly_with_long_timestampssrc/i18n/editor_shell_surface_tests.rs: the new strings

Confidence Score: 5/5
This PR appears safe to merge.Summary
Adds SRT and WebVTT downloads from the Transcript tab, timed to the edited video.
Reviews (13) · Last reviewed commit: "docs(desktop-gpui): drop the caption exp..." · Reviewed by Greptile