ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Video Processing → Trim & Merge Video

AI-generated

Overview

This node provides video processing capabilities focused on trimming and merging video segments based on user-defined highlights. It allows users to specify multiple highlight time ranges within a video and optionally add visual transitions between these trimmed segments. This is useful for creating summarized or highlight reels from longer videos, such as event recaps, tutorials, or promotional clips.

Practical examples:

  • Extracting key moments from a recorded webinar by specifying start and end times.
  • Creating a highlight reel of sports events with smooth transitions between plays.
  • Trimming out irrelevant parts of a video and merging the important sections seamlessly.

Properties

Name Meaning
Video Url A valid URL pointing to the source video to be processed.
Video Highlights JSON-formatted array of objects specifying highlight segments with their start-end times and reasons, e.g., introduction, main event. 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 insert transitions between the trimmed video segments.
Transition Type The style of transition effect to apply between segments if transitions are enabled. Options include: Cross Zoom, Dissolve, Fade, Wipe Left, Wipe Right.
Transition Duration Duration in seconds for each transition effect applied between video segments.

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 operations. If binary data output is supported (not explicitly shown in the provided code), it would represent the final video file content ready for further use or download.

Dependencies

  • Requires an API key credential for accessing the underlying ffmpeg-based video processing service.
  • The node depends on external video processing libraries or services that handle video trimming, merging, and transition effects.
  • Proper network access to the video URL is necessary for fetching the source video.

Troubleshooting

  • Invalid Video URL: Ensure the provided video URL is accessible and points to a valid video file format supported by the service.
  • 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.
  • Transition Errors: If transitions are enabled but the type or duration is invalid or unsupported, the node may fail or produce unexpected results. Use only the provided transition options and reasonable durations.
  • API Authentication Failures: Missing or incorrect API credentials will prevent the node from executing video processing tasks.
  • Timeouts or Large Files: Processing very large videos or many highlight segments might lead to timeouts or performance issues depending on the backend service limits.

Links and References

  • FFmpeg Official Documentation – For understanding video processing concepts like trimming and transitions.
  • JSON Format Guide – To ensure correct formatting of the Video Highlights input.
  • n8n Community Forum and Docs for troubleshooting custom node executions and credential setup.

Discussion