๐ฆ RS Split Video/Audio
Pull the soundtrack out without touching a single frame
- video
- video_only
- audio_only
You've got a clip with audio, and a downstream node that doesn't want it - an upscaler, an interpolator, a video-to-video pass that garbles the mix. Or the reverse: you want the soundtrack on its own, as a voice reference, a beat to cut to, foley you plan to reuse.
SplitVideoAudio covers both. One VIDEO in, two plugs out: the picture with no audio, and the audio by itself. It's the newest node in the pack (v0.50.1), and the kind of utility you forget about until you need it twice in one afternoon.
How it works
Whether this node is instant or slow comes down to one thing.
If your video comes from a file - a native Load Video node, a clip you dropped in - the node notices the underlying path and shells out to ffmpeg. The video track gets remuxed with -c:v copy: no re-encode, no generational loss, just a container rewrite that drops the audio stream. Only if that fails does it re-encode (libx264, crf 18), trying container variants in between. The audio is dumped to a WAV (pcm_s16le) and read back as a waveform tensor, so audio_only is ComfyUI's standard AUDIO dict - {"waveform": [...], "sample_rate": 44100} - the same shape SaveAudio, PreviewAudio and the LTX audio VAE nodes speak.
If the video only exists in memory (something upstream generated it, so there's no file), or ffmpeg isn't installed, it takes the other road: rebuild a silent version from the same frames and frame rate, and hand back whatever audio it found. That path decodes the whole clip into RAM, so on long clips you'll feel it.
One design decision you'll appreciate: it never returns None for audio. A silent clip still produces a valid one-sample silent placeholder, so downstream AUDIO inputs stay satisfied instead of throwing a type error. It's a placeholder, not a silence track the length of your clip - if something downstream scales or aligns by audio duration, feed it a real track.
Inputs and outputs
There is one input: video (VIDEO). No widgets, no settings, nothing to tune. That's the entire node.
Two outputs. video_only (VIDEO) is the silent clip - wire it into SaveVideo, your upscaler, your interpolator. audio_only (AUDIO) is the extracted track - into SaveAudio to keep it, or into an audio-driven stage if you're building toward lip-sync or foley. The KB's read on audio in ComfyUI still holds: it's a bolted-on layer, so expect to route this into a pack with its own dependency stack rather than into something core.
And a fair question: ComfyUI core has GetVideoComponents, which also splits a clip - but it hands you frames plus audio, and reassembling means CreateVideo with an fps value you now have to keep straight. This node keeps the picture as a VIDEO end to end, which is what you want when the next node is a video node.
Installing it
The node ships in the RaykoStudio pack, so install the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Raykosan/ComfyUI_RaykoStudio
Then restart ComfyUI. Or search RaykoStudio in ComfyUI Manager - easier, since the pack's requirements.txt is chunky (torch, opencv-python, numpy, Pillow, freetype-py, pycairo, scipy) and you want pip resolving it for you. On Windows, pycairo is the one that usually fights you - if pip starts building it from source, you're in for a compiler. This splitter doesn't need it; RS Text Overlay Pro does. A failed pack install blocks both.
This node itself needs very little: torch, and a ComfyUI new enough to have the native video type API. Too old and it errors out loudly with "ComfyUI video type API is unavailable" rather than doing something weird.
ffmpeg is the real requirement, and it's optional-ish in a confusing way. The node looks for it in three places, in order: the RS_FFMPEG_PATH environment variable if you've set it, then your system PATH, then the bundled binary from imageio-ffmpeg if that package happens to be installed:
# easiest on Windows/Linux if you don't want a system install
pip install imageio-ffmpeg
Where people get tripped up
No ffmpeg, no fast path. Without it, every clip takes the in-memory route: full decode, slower, heavier. If splitting suddenly got slow, check ffmpeg -version first.
torchaudio. The fast path uses it to read the extracted WAV. If it's missing, the node silently falls back to the slow path instead of erroring - so you get correct output and no clue why it took ten times longer:
pip install torchaudio
Don't expect the picture to be a tensor. video_only points at a temp file in ComfyUI's temp directory (under a rayko_split_* folder). Nodes that want frames decode them from there - fine, just budget disk for long clips.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | โ |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_only | VIDEO | โ |
| audio_only | AUDIO | โ |