Actions13
- Video Actions
- Audio Actions
- Text Actions
- Image Actions
- Font Actions
Overview
The node provides advanced media processing capabilities using FFmpeg, focusing here on the Audio - Mix operation. It mixes two audio sources—one primary and one secondary—into a single audio output. Users can input these sources either as URLs or binary data, adjust their volumes independently, and control how the mixing is applied (full mix or partial mix within a specific time range). Additional effects like fade-in and fade-out can be applied to the secondary audio source.
This node is beneficial in scenarios such as:
- Adding background music or sound effects to an existing video or audio track.
- Combining multiple audio tracks for podcasts or multimedia projects.
- Creating audio overlays with precise timing and volume control.
- Applying smooth transitions on audio layers with fade effects.
Example use cases:
- Mixing a voiceover track (secondary) into a video’s original audio (primary) with volume adjustments.
- Overlaying ambient sounds onto a podcast episode with fade-in/out effects.
- Inserting a notification sound at a specific time segment of a longer audio file.
Properties
| Name | Meaning |
|---|---|
| Primary Source Type | Type of primary source input: URL or Binary Data. |
| Primary Source URL | URL of the primary video or audio source (used if Primary Source Type is URL). |
| Primary Source Binary Property | Binary property name containing the primary source data (used if Primary Source Type is Binary Data). |
| Secondary Audio Source Type | Type of secondary audio source input: URL or Binary Data. |
| Secondary Audio Source URL | URL of the secondary audio source to mix in (used if Secondary Audio Source Type is URL). |
| Secondary Audio Source Binary Property | Binary property name containing the secondary audio source data (used if Secondary Audio Source Type is Binary Data). |
| Primary Source Volume | Volume level for primary source; ranges from 0 (mute) to 10 (max), default 1.0 means original volume. |
| Secondary Audio Volume | Volume level for secondary source; same scale as primary volume. |
| Enable Partial Mix | Boolean to enable mixing only within a specific time range instead of full length. |
| Output Length (Full Mix) | When partial mix is disabled, determines output length: Shortest (ends when shortest source ends), Longest (ends when longest source ends), or From Primary Source (matches primary source length). |
| Start Time (seconds) | Start time in seconds for partial mix insertion (required if partial mix enabled). |
| Mix Duration (seconds) | Duration in seconds for partial mix; leave empty to use full audio length (optional). |
| Loop Audio if Shorter | If true and secondary audio is shorter than mix duration, loops it to fill duration; otherwise inserts as-is and may end early. |
| Enable Fade In | Apply fade-in effect to secondary audio (boolean). |
| Fade In Duration (seconds) | Duration of fade-in effect in seconds (applies if fade-in enabled). |
| Enable Fade Out | Apply fade-out effect to secondary audio (boolean). |
| Fade Out Duration (seconds) | Duration of fade-out effect in seconds (applies if fade-out enabled). |
Output
The node outputs a binary file representing the mixed audio result. The output structure includes:
json: An empty JSON object{}indicating no additional metadata by default.binary.data: Contains the mixed audio file data prepared for further workflow usage or download.pairedItem.item: Index of the input item this output corresponds to.
If the operation fails but continues on error, the output JSON will contain error details including the message, operation name, and success flag set to false.
Dependencies
- Requires FFmpeg installed and accessible in the environment where n8n runs, as all media processing relies on FFmpeg commands.
- No external API keys or services are needed; all processing is local.
- Uses internal helper functions to resolve inputs from URLs or binary data and to clean up temporary files.
- Node expects valid audio/video source inputs either via URLs or binary properties.
Troubleshooting
Common issues:
- Missing or invalid source URLs or binary data properties will cause errors.
- FFmpeg not installed or not in PATH will prevent processing.
- Incorrect volume values outside allowed range (0 to 10) might cause unexpected results.
- Enabling partial mix without specifying required start time or duration may lead to errors.
- Using binary property names that do not exist in input items will throw errors.
Error messages:
"No binary data found in property '...'":Check that the specified binary property exists and contains valid data."Operation 'mixAudio' on resource 'audio' did not produce an output.": Indicates failure in mixing process; verify input sources and parameters.- File not found errors for local paths (if used) indicate incorrect file references.
Resolutions:
- Ensure all URLs are reachable and point to valid media files.
- Verify binary data is correctly attached to input items.
- Confirm FFmpeg installation and version compatibility.
- Double-check parameter combinations especially when enabling partial mix and looping.
Links and References
- FFmpeg Official Documentation – For understanding underlying media processing capabilities.
- n8n Documentation – General guidance on creating and using custom nodes.
- MediaFX GitHub Repository (if available) – For source code and updates related to this node.
