Subtitle embedding
Hard or soft subtitles, straight from the graph
- settings
- output_path
This is the reason the pack exists: give it a video and a subtitle file, and it gives you back a video with the subtitles in it - either soft (tucked into the container as a toggleable track) or hard (burned into the pixels). No terminal, no hand-typed ffmpeg incantation, no leaving ComfyUI. If you're making videos with subtitles - translated dialogue, captions, karaoke lyrics - this is the node you'll actually reach for.
The two methods are meaningfully different, so pick deliberately:
- Soft muxes the subtitle file in as a separate stream. Viewers can turn it off or swap styles, and it's instant because nothing gets re-encoded. The catch: the node only supports soft embedding into MKV output. Set the format to anything else and it quietly logs an error and returns without doing the job - MKV is the default container for exactly this reason.
- Hard bakes the text into every frame using FFmpeg's
subtitles=filter. It works with any output format, and since it renders via libass, ASS styling - fonts, colors, karaoke effects - is respected. You're paying with a real re-encode, which is why you usually only hard-burn when you must (uploading to a site that ignores soft tracks, or you need the text visible everywhere).
The inputs that matter
- video_path / subtitle_path - plain text fields, not file pickers. Type an absolute path, or a path relative to wherever ComfyUI runs. The node checks both files exist before doing anything.
- embed_method -
softorhard, as above. - filename_prefix (default
video/embedded) - the output lands in ComfyUI'soutput/folder as<prefix>_<video_name>.<ext>. - settings (optional) - an
FFMPEG_SETTINGSobject from the FFMpegSettings node. Leave it unconnected and it falls back to its own sensible defaults (MKV, stream copy).
The single output_path (STRING) it returns is where the finished file was written - wire it into a preview or file node, or just read it from the console.
Troubleshooting
- Soft embed with a non-MKV format: refused by design. Check the console log.
- "No such filter: subtitles": your FFmpeg was built without libass. The
subtitles=filter isn't a default in every build - gyan's full Windows builds and typical Linux/macOS distro builds have it; minimal static builds often don't. Swap to a full build. - The classic trap - hard burn plus a custom resolution silently loses your subtitles. If you hard-burn and the settings node has a
resolutionother thansource, the node appends a second-vf scale=...and FFmpeg honors the last-vf, so the burn filter gets dropped and you get clean, subtitle-less video. Keep resolution atsourcewhen hard-burning. - Windows paths: the node escapes drive colons for the filter, but keep paths simple anyway - commas and special characters inside
-vf subtitles='...'will fight you.
Installing
It's part of ComfyUI-ASSSSA: install the pack from ComfyUI Manager (search "ComfyUI-ASSSSA") or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HighDoping/ComfyUI_ASSSSA
Then restart ComfyUI. No Python packages to install and no models to download - the only hard dependency is FFmpeg on your PATH, with libass if you plan to hard-burn.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | video.mp4 | — |
| subtitle_path | STRING | subtitles.srt | — |
| filename_prefix | STRING | video/embedded | Prefix for the output video file |
| embed_method | COMBO | soft | 2 options: soft, hard |
| settingsopt | FFMPEG_SETTINGS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |