DIGIT SRT From Video
Subtitles from any video, transcribed by Gemini and burned in if you want
- srt_filepath
- srt_text
If you've ever transcribed a video, you know the usual path is Whisper or a web tool, then a lot of manual SRT cleanup. DIGIT SRT From Video skips most of that: point it at a video file, and it extracts the audio, sends it to Gemini for transcription with timestamps, runs a proper subtitle post-processing pipeline, and hands you broadcast-ready SRT (or VTT, ASS, TXT - or burned straight into the video). It's from the same DIGIT pack as SRT Maker, but where Maker builds captions from a script, this one works from the audio. Two different jobs, complementary.
The appeal is the post-processing. Raw LLM transcription is messy - repeated hallucinated lines, 200-character entries, timestamps that land mid-frame. This node fixes those before you ever see the file: hallucination removal, line-length enforcement, frame padding, and snapping timestamps to frame boundaries. That last one matters more than it sounds on frame-accurate systems like Flame, where a subtitle that flickers between frames is a delivery failure.
The inputs that matter
video_path- the file. Browse button in the UI, or paste a path.model-gemini-2.5-flashby default; you can step up to Pro or the Gemini 3 previews if accuracy on hard audio matters more than speed.subtitle_output-srt_only(sidecar files),burn_in_only(hardcode subs into the video), orboth.extra_instructions- free text like "ignore background music" or "this is a commercial". Genuinely worth filling in; it's cheap accuracy.language-autoworks, but specifying the language improves timestamps.translate_toadds a translation pass that preserves timing.- The post-processing knobs:
max_chars_per_line(42 = Netflix/broadcast standard),max_lines(2),pad_frames(breathing room),snap_to_frames,remove_hallucinations(on by default). - Burn-in styling, only when you're hardcoding:
font_name,font_size,font_color,outline_width,shadow_depth,position,margin_v. If you're just saving sidecars, ignore all of them.
Outputs: srt_filepath (where it saved) and srt_text (the raw content, handy for piping into SRT Preview or SRT Tools for more QA).
How it works
Under the hood: ffmpeg extracts the audio to a small mono 16kHz WAV, Gemini transcribes with precise timestamps, and the post-processing pipeline runs in order. If you chose burn_in_only or both, it re-encodes the video with the subtitles overlaid - if an ASS file was produced it uses that for full styling, otherwise it applies force_style to the SRT. Files land in PROJEKTS/project/assets/auto_srt/ following the pack's VFX folder convention.
Setup
Same pack install as everything else here - ComfyUI Manager, search comfyui-digit, restart. Two environment prerequisites:
# Gemini needs GCP Vertex auth
gcloud auth application-default login
# ffmpeg must be on PATH or nothing works
ffmpeg -version
The GCP setup is the standard DIGIT one: enable aiplatform.googleapis.com, set gcp_project_id on the node (or rely on auto-detect), leave gcp_region at global. If you see a "File not found" that's the ffmpeg check or the path being wrong - and if audio extraction fails, ffmpeg isn't finding the codec, which is a system-level problem, not a node bug.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | — | |
| model | COMBO | gemini-2.5-flash | 9 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite, gemini-3.1-pro-preview, +3 |
| subtitle_output | COMBO | srt_only | srt_only: sidecar file(s). burn_in_only: hardcode subs into video. both: file(s) + burned-in video. |
| extra_instructions | STRING | — | |
| projekts_root | COMBO | 1 options: /root/PROJEKTS | |
| project | COMBO | 1 options: (no projects found) | |
| filename | STRING | transcription | — |
| gcp_project_id | STRING | GCP project ID. | |
| gcp_region | STRING | GCP region. | |
| identify_speakersopt | BOOLEAN | true | Try to identify and label different speakers. |
| pad_framesopt | INT | 00–120 | Extend each subtitle by this many frames on both sides (head and tail). |
| frame_rateopt | FLOAT | 23.9761–120 | Frame rate of the video. Used for pad_frames and snap-to-frame. |
| snap_to_framesopt | BOOLEAN | false | Snap all timestamps to nearest frame boundary. Prevents subtitle flicker on frame-accurate systems. |
| max_chars_per_lineopt | INT | 420–80 | Max characters per subtitle line. 42 = Netflix/broadcast standard. 0 = no enforcement. |
| max_linesopt | INT | 21–4 | Max lines per subtitle entry. Entries exceeding this get split. |
| remove_hallucinationsopt | BOOLEAN | true | Detect and remove repeated/hallucinated subtitle entries. |
| output_formatopt | COMBO | srt | Output format(s). 'all' saves SRT + VTT + ASS + TXT. |
| languageopt | COMBO | auto | Language of the audio. 'auto' lets Gemini detect. Improves accuracy when specified. |
| translate_toopt | COMBO | none | Translate subtitles to this language after transcription. 'none' = no translation. |
| font_nameopt | STRING | Arial | Font family for burn-in subtitles. |
| font_sizeopt | INT | 248–120 | Font size for burn-in subtitles. |
| font_coloropt | COMBO | white | Subtitle text color. |
| outline_coloropt | COMBO | black | Subtitle outline/border color. |
| outline_widthopt | INT | 20–8 | Outline thickness around subtitle text. |
| shadow_depthopt | INT | 10–8 | Shadow depth behind subtitle text. |
| positionopt | COMBO | bottom_center | Where to place subtitles on screen. |
| margin_vopt | INT | 300–200 | Vertical margin from screen edge (pixels at 1080p). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| srt_filepath | STRING | — |
| srt_text | STRING | — |