Edit videos by transcript - #2057
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
| } catch (error) { | ||
| if (!isPublicError(error)) { | ||
| console.error( | ||
| `[editTranscript] Failed to load transcript for ${videoId}`, |
| ]); | ||
| } catch (error) { | ||
| console.error( | ||
| `[editTranscript] Failed to start backfill for ${videoId}`, |
| } catch (error) { | ||
| if (!isPublicError(error)) { | ||
| console.error( | ||
| `[editTranscript] Failed to request transcript for ${videoId}`, |
| ...getAssemblyAITranscriptionOptions(language), | ||
| disfluencies: true, | ||
| }); |
There was a problem hiding this comment.
disfluencies: true is already set inside getAssemblyAITranscriptionOptions, so this is redundant. The same duplicate appears in transcribeEditTranscriptWithAssemblyAI below.
| ...getAssemblyAITranscriptionOptions(language), | |
| disfluencies: true, | |
| }); | |
| ...getAssemblyAITranscriptionOptions(language), | |
| }); |
| }); | ||
| const transcript = await client.transcripts.transcribe({ | ||
| audio: audioBuffer, | ||
| ...getAssemblyAITranscriptionOptions("auto"), |
There was a problem hiding this comment.
The original transcription pass uses the org's configured aiGenerationLanguage (via validateVideo), but the backfill hardcodes "auto". For orgs that pinned a specific language, this can produce a transcript with different word segmentation or even a mismatched detected language, and the remapped captions would then diverge from the original ones. Consider threading the org's aiGenerationLanguage into the backfill payload (or loading it in validateEditTranscriptBackfill) so both passes stay consistent.
| const videoObserver = new MutationObserver(attachVideoListeners); | ||
| videoObserver.observe(document.body, { | ||
| childList: true, | ||
| subtree: true, |
There was a problem hiding this comment.
Observing document.body with subtree: true fires the callback on every DOM mutation across the whole page (tooltips, menus, virtual list updates, etc.). Although attachVideoListeners early-returns once the video is bound, the observer churn itself adds overhead on a view that already runs a virtualizer and rAF loops. Scoping the observer to the video element's nearest container, or replacing it with a lighter check (e.g. a short polling retry on mount/words change), would avoid the app-wide mutation tax.
|
hey @greptileai, please re-review the PR |
Adds word-level transcript editing in the web video editor. Transcription now stores an immutable, encrypted word transcript; the sidebar lets you cut fillers/words into timeline deletes, and edits remap captions from that transcript instead of re-transcribing when possible.
Greptile Summary
Adds transcript-based video editing across the web and media-processing pipeline.
Confidence Score: 5/5
The PR appears safe to merge.
The previously reported decode-amplification issue is addressed by input-side seeking, batches capped at four ranges, sequential batch execution, and a timeout shared across rendering and concatenation; no blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "fix: bound video edit transcoding" | Re-trigger Greptile