---
title: "Media Splitter"
description: "Split an audio OR video file into an ordered array of segments, each at most `maxSeconds` long (default 14), via an ffmpeg time-split. General-purpose cutter — e.g. split a full TTS track into sub-15s slices to fan out one talking-avatar clip per slice (Seedance caps a clip at 15s). Set config `extract: \"audio\"` to re-encode every segment as audio-only mp3; with no explicit maxSeconds/chunkCount that mode uses a 3600s window, so a track under an hour comes back as ONE file on the `audio` output (video → audio extraction, e.g. a reference ad soundtrack for Seedance `audio_urls`). Set config `ranges` to cut EXACT windows instead (\"0-30, 30-45\", seconds, decimals allowed); ranges may be out of order or non-contiguous and are used as given. When `ranges` is set it OVERRIDES maxSeconds/chunkCount, and it composes with `extract: \"audio\"` (audio-only slices). Calls a Lambda, whose cost is operational and absorbed: this node quotes and charges 0 credits."
updated: 2026-09-10
---

# Media Splitter

**Node type:** `utility:media_splitter`  
**Category:** `Editing`

## Description

Split an audio OR video file into an ordered array of segments, each at most `maxSeconds` long (default 14), via an ffmpeg time-split. General-purpose cutter — e.g. split a full TTS track into sub-15s slices to fan out one talking-avatar clip per slice (Seedance caps a clip at 15s). Set config `extract: "audio"` to re-encode every segment as audio-only mp3; with no explicit maxSeconds/chunkCount that mode uses a 3600s window, so a track under an hour comes back as ONE file on the `audio` output (video → audio extraction, e.g. a reference ad soundtrack for Seedance `audio_urls`). Set config `ranges` to cut EXACT windows instead ("0-30, 30-45", seconds, decimals allowed); ranges may be out of order or non-contiguous and are used as given. When `ranges` is set it OVERRIDES maxSeconds/chunkCount, and it composes with `extract: "audio"` (audio-only slices). Calls a Lambda, whose cost is operational and absorbed: this node quotes and charges 0 credits.

## Canvas ports

These appear as port handles on the left side of the node.

| ID      | Label              | Details                |
| ------- | ------------------ | ---------------------- |
| `media` | **Audio or Video** | `UNKNOWN` _(required)_ |

## Sidebar config

These render as form fields in the right-side config panel when the node is selected.

| ID           | Label                                                           | Details                               |
| ------------ | --------------------------------------------------------------- | ------------------------------------- |
| `extract`    | **Output**                                                      | `TEXT` · options: `segments`, `audio` |
| `ranges`     | **Ranges (seconds)**                                            | `TEXT`                                |
| `maxSeconds` | **Max Seconds per Segment (blank = 14, or 3600 in audio mode)** | `NUMBER`                              |
| `chunkCount` | **Segment Count**                                               | `NUMBER`                              |

## Outputs

| ID                 | Label                        | Type     |
| ------------------ | ---------------------------- | -------- |
| `segments`         | **Segment URLs**             | `ARRAY`  |
| `segmentsDetailed` | **Segments (detailed JSON)** | `JSON`   |
| `count`            | **Segment Count**            | `NUMBER` |
| `audio`            | **Audio Track**              | `AUDIO`  |

## Three ways to drive it

- **Even chunking (default).** Every segment is at most **Max Seconds per
  Segment** long (14 when blank) and the cuts are plain time offsets, so the
  segments concatenate back continuously. A general-purpose cutter: for
  example, split a full TTS track into sub-15s slices to fan out one
  talking-avatar clip per slice (Seedance caps a clip at 15s).
- **Exact ranges.** Set **Ranges** to cut specific windows: `0-30, 30-45`.
- **Audio extraction.** Set **Output** to `audio` to re-encode every segment
  as audio-only mp3.

## Cutting exact ranges

**Ranges** takes comma-separated `start-end` pairs in seconds, decimals
allowed:

```
0-30, 30-45
12.5-18, 90-95.25
```

Rules worth knowing:

- **Ranges override Max Seconds and Segment Count.** When set, those are not
  sent at all.
- Ranges are used **as given**. They may sit out of order, overlap, or leave
  gaps, because they are explicit cuts and not a tiling of the source.
  `30-45, 0-10` returns the 30-45 clip first.
- They compose with `audio` output, giving audio-only slices of those windows.
- A malformed range fails the node and quotes the bad token. Nothing is
  silently dropped.
- A range whose end runs past the end of the media fails the node and tells you
  the real duration, rather than quietly returning a short clip.
- Up to 50 ranges per node.

## Blank is not zero

**Max Seconds per Segment** and **Segment Count** are deliberately declared
with no default, so an untouched node shows empty boxes. Empty means UNSET, and
unset is what you want almost always: the node then picks 14 when splitting and
3600 in audio mode, which is the whole reason a soundtrack comes back as one
file rather than in fourteen-second pieces.

Clearing a box you previously typed in returns it to unset. It does not become
zero, and it does not silently fall back to the splitting default while you are
in audio mode.

## This node is free

It quotes 0 credits and charges 0. `utility:` is a free prefix, the executor
deducts nothing, and it dispatches no paid work, so nothing bills downstream of
it either. The ffmpeg Lambda behind it is our operational cost, not yours.

## Reading the outputs

**Segment URLs** is a plain string array; wire it into a Text Iterator's array
input to fan out per-segment processing. **Segments (detailed JSON)** carries
`{ index, url, startSeconds, durationSeconds }` per segment, for inspection or
any timing-aware consumer.

**Audio Track** carries the FIRST segment in `audio` output mode, which under
the default 3600s window is the whole track. It is empty in `segments` mode.
A track longer than an hour is split, so Audio Track holds only the first hour
and the rest sit on Segment URLs.

## Notes

- The **Audio or Video** input accepts a bare URL string or an object carrying
  `url` / `audioUrl` / `videoUrl` / `video` / `audio`.
- Output mode only accepts `segments` or `audio`. Anything else is refused by
  name rather than treated as the default, except a range-shaped string, which
  is read as Ranges.

---

_Auto-generated from the Wireflow node registry._

---

Documentation index: fetch https://www.wireflow.ai/llms.txt for the full list of Wireflow docs.
