Ffmpeg
Overview
This node provides a versatile interface to manipulate media files using FFmpeg, a powerful multimedia framework. It supports multiple operations including merging videos, overlaying audio onto video, converting media formats, retrieving media info, and running custom FFmpeg commands.
The Overlay Audio operation specifically allows users to combine an audio track with a video file without re-encoding the video stream, which is useful for adding background music, voiceovers, or sound effects to existing videos.
Practical examples:
- Adding a podcast audio track to a static video image.
- Overlaying commentary audio on a recorded gameplay video.
- Combining a music track with a silent video clip for social media posts.
Properties
| Name | Meaning |
|---|---|
| Output File Name | The name of the resulting output file. The extension is automatically set based on the output format in conversion scenarios. Required. |
| Output Binary Property | The name of the binary property where the output data will be stored. Required. |
| FFmpeg Overlay Arguments | A customizable FFmpeg command template for overlaying audio on video. Supports placeholders {video}, {audio}, and {output}. Default: -i "{video}" -i "{audio}" -c:v copy -c:a aac "{output}". |
Output
The node outputs a single item containing a binary property (named as per the "Output Binary Property" input) that holds the resulting media file after processing. The output binary data represents the combined video and audio file in the specified format (e.g., MP4).
No additional JSON fields are explicitly defined by this operation; the main output is the processed media binary.
Dependencies
- Requires FFmpeg installed and accessible in the environment where n8n runs.
- No external API keys or services are needed.
- The node relies on correct input binary data representing video and audio files.
Troubleshooting
Common issues:
- Incorrect or missing input files: Ensure both video and audio inputs are provided and correctly referenced.
- Invalid FFmpeg arguments: Customizing the FFmpeg command incorrectly can cause failures.
- Unsupported media formats: Input files must be compatible with FFmpeg.
Error messages:
- Errors related to FFmpeg execution usually indicate problems with input files or command syntax.
- "File not found" errors suggest missing or improperly linked input binaries.
Resolutions:
- Verify input data presence and correctness.
- Test FFmpeg commands independently to ensure validity.
- Use default FFmpeg overlay arguments if unsure about custom commands.