ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Overview

This node provides video processing capabilities using ffmpeg, specifically supporting a "Trim & Merge Video" operation under the "Video Processing" resource. The node allows users to input a video URL and specify multiple highlight segments (time ranges with reasons) to trim from the original video. It can then merge these trimmed segments into a single output video. Optionally, transitions such as fade to white or fade to black can be added between the merged segments to create smooth visual effects.

Common scenarios for this node include:

  • Creating highlight reels by extracting key moments from long videos.
  • Editing event footage to keep only important parts.
  • Generating summarized versions of webinars, lectures, or sports matches.
  • Adding professional transitions between clips for polished video presentations.

Example: A user has a 1-hour lecture recording and wants to extract the introduction (0:00–0:10), main event (1:00–1:30), and conclusion segments, merging them into one short video with fade-to-black transitions between segments.

Properties

Name Meaning
Video Url A valid URL pointing to the source video file to be processed.
Video Highlights JSON string representing an array of objects, each containing highlight_reason (description of the segment) and highlight_time (time range in format "HH:MM - HH:MM") specifying which parts of the video to trim and merge. Example: [{"highlight_reason": "Introduction", "highlight_time": "00:00 - 00:10"}, {"highlight_reason": "Main event", "highlight_time": "01:00 - 01:30"}].
Add Transitions Boolean flag indicating whether to add transitions between the trimmed video segments.
Transition Type If transitions are enabled, specifies the type of transition effect to apply between segments. Options are: "Fade White" or "Fade Black".

Output

The node outputs a JSON object representing the processed video result. This typically includes metadata about the newly created video file after trimming and merging. If binary data output is supported, it would contain the merged video file content ready for further use or download.

  • json: Contains details about the processed video, such as file path, duration, or status.
  • Binary data (if applicable): The actual video file resulting from the trim and merge operation.

Dependencies

  • Requires access to an ffmpeg processing backend or API service capable of handling video trimming, merging, and applying transitions.
  • Needs a valid API authentication token configured in n8n credentials to connect to the ffmpeg service.
  • The input video must be accessible via the provided URL.

Troubleshooting

  • Invalid Video URL: Ensure the video URL is reachable and points to a valid video file format supported by ffmpeg.
  • Malformed Highlights JSON: The Video Highlights property must be a correctly formatted JSON string representing an array of objects with highlight_reason and highlight_time. Invalid JSON will cause parsing errors.
  • Incorrect Time Format: Highlight times should follow the "HH:MM - HH:MM" format. Incorrect formats may lead to trimming failures.
  • Transitions Not Applied: If transitions are enabled but not visible, verify that the selected transition type is supported and that the ffmpeg backend supports transition effects.
  • API Authentication Errors: Check that the API key or authentication token is correctly set up in n8n credentials and has sufficient permissions.

Links and References

Discussion