Overview
The Split Audio node splits a single audio file into multiple smaller chunks of a specified size. It supports input either as binary data or as a file path, and outputs the resulting audio segments either as binary data in memory or as file paths on disk.
This node is useful when you need to:
- Break down large audio recordings into manageable pieces for easier processing or uploading.
- Prepare audio files for streaming or distribution in smaller segments.
- Process or analyze audio in chunks rather than as a whole.
Practical examples:
- Splitting a podcast episode into 10MB segments for upload to a platform with file size limits.
- Dividing a long interview recording into smaller parts for transcription workflows.
- Preparing audio files for batch processing or conversion in downstream nodes.
Properties
| Name | Meaning |
|---|---|
| Input Type | Choose whether the input audio comes from Binary Data (an incoming binary property) or a File Path (a path string from a previous node). |
| Binary Property | (When using Binary Data) The name of the binary property containing the audio file to split. Default is data. |
| File Path Field | (When using File Path) The JSON property name that contains the file path string. Usually this is fileName from nodes like Read/Write Files. |
| Chunk Size | Size of each output chunk in megabytes (MB). For example, 10 means each segment will be approximately 10MB in size. |
| Output Prefix | Prefix used for naming the output chunk files. For example, "segment" results in filenames like original_segment_001.mp3. |
| Output Format | Format of the output chunks. Options are: Same As Input, MP3, M4A, WAV. If "Same As Input" is selected, the output format matches the original file's format. |
| Delete Original File After Processing | (Only for File Path input) Whether to delete the original input file after successful splitting. Useful for cleanup to save disk space. |
| Memory Management | How to handle memory usage during processing. Options: Standard (default) or Low Memory (uses less RAM but slower processing). |
| Output Storage | Where to store the output chunks: In Memory as binary data (default n8n behavior) or On Disk as file paths (to avoid high RAM usage). |
| Output Directory | (Only when storing output on disk) Directory path where split files will be saved. Leave empty to use the system temporary directory. |
Output
The node outputs an array of items, each representing one audio chunk. Each item contains:
json: Metadata about the chunk including:
filename: The chunk's filename.filePath: (If output stored on disk) Full path to the chunk file.size: Size of the chunk in bytes.sizeInMB: Size of the chunk in megabytes.originalFile: Original input filename with extension.duration: Duration of the chunk in seconds (approximate).storageMode: Either"memory"or"disk"depending on output storage setting.
binary: (If output stored in memory) Contains the chunk's binary audio data prepared for further n8n processing.
If output is stored on disk, only file paths are returned without loading the binary data into memory, which helps prevent RAM issues with large files.
Dependencies
- FFmpeg: This node requires FFmpeg installed and accessible in the system PATH. FFmpeg is used to perform the actual audio splitting.
- Node.js modules: Uses standard Node.js modules (
fs,path,os) and thefluent-ffmpeglibrary for interfacing with FFmpeg. - No special credentials or API keys are required.
Troubleshooting
FFmpeg not found error:
Error: "FFmpeg is required for this node to work but was not found. Please install FFmpeg."
Solution: Install FFmpeg on your system and ensure it is available in the system PATH.Missing binary data property:
Error:No binary data property "X" exists on item!
Solution: Verify the binary property name matches the actual property containing the audio data.File path not found or inaccessible:
Error:Cannot access file at path: ...
Solution: Check that the file path is correct, the file exists, and the node has read permissions.No usable binary data found:
Error: "No usable binary data found! The data must either be stored in a file or as base64 data."
Solution: Ensure the binary data is properly set as base64 or a valid file path is provided.Invalid input type:
Error: "Invalid input type. Please select either Binary Data or File Path."
Solution: Select a valid input type option.Cleanup warnings:
Temporary files or directories may fail to delete if locked or permission denied; these warnings can usually be ignored but verify disk space if persistent.
Links and References
- FFmpeg Official Website – Required tool for audio processing.
- fluent-ffmpeg GitHub – Node.js wrapper for FFmpeg used internally.
- n8n Documentation – General information on creating and using custom nodes.