Overview
This node concatenates two audio files with an optional silence gap and optional fade effects between them. It takes two binary audio inputs, inserts a silence gap of specified duration between them, applies fade-out to the first file and fade-in to the second file if specified, and outputs the combined audio in a chosen format. This is useful for audio editing workflows where seamless transitions or pauses between audio clips are needed, such as podcast editing, music production, or audio message creation.
Use Case Examples
- Concatenate two podcast segments with a 2-second silence gap and fade effects for smooth transition.
- Combine two music tracks with a 1-second gap and output as MP3.
- Insert a silence gap between two voice recordings with no fades and output in WAV format.
Properties
| Name | Meaning |
|---|---|
| File 1 Binary Property | The binary property name of the first audio file input. |
| File 2 Binary Property | The binary property name of the second audio file input. |
| Gap Duration (s) | Duration of silence gap in seconds to insert between the two audio files. |
| Fade-out of File 1 (ms) | Duration in milliseconds to apply fade-out effect at the end of the first audio file. |
| Fade-in of File 2 (ms) | Duration in milliseconds to apply fade-in effect at the start of the second audio file. |
| Output Format | Format of the output audio file. Can be same as first file or explicitly WAV, MP3, or FLAC. |
| Output Binary Property Name | The name of the binary property where the output audio data will be stored. |
Output
JSON
json- Empty JSON object as no additional metadata is output.binary- Binary data of the concatenated audio file with gap and fades applied.
Dependencies
- fluent-ffmpeg library for audio processing
- Node.js fs module for file operations
- Node.js os module for temporary directory
- Node.js path module for file path handling
- Helper utilities for ffmpeg operations and binary data handling
Troubleshooting
- Ensure the specified binary properties for input files exist and contain valid audio data, otherwise the node will throw an error.
- The output format must be supported by ffmpeg and match the codec settings; unsupported formats or codec mismatches may cause processing failures.
- Temporary file creation and deletion require appropriate file system permissions; lack of permissions may cause errors.
- Fade durations should not exceed the length of the respective audio files to avoid unexpected results.