ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Overview

This node provides video processing capabilities focused on trimming and merging video segments based on user-defined highlights. It allows users to input a video URL and specify multiple highlight segments with start and end times along with reasons for those highlights. The node then trims the video into these segments and merges them into a single output video. Optionally, it can add visual transitions between the merged segments to create a smooth viewing experience.

Common scenarios where this node is beneficial include:

  • Creating highlight reels from longer videos by extracting key moments.
  • Editing event footage to focus on important parts without manual video editing software.
  • Automatically generating summarized videos for presentations or social media sharing.

Practical example:
A user has a 1-hour conference recording and wants to create a 5-minute highlight video showing only the introduction, keynote speech, and closing remarks. They provide the video URL and specify the time ranges for these sections as highlights. The node trims these parts and merges them, optionally adding fade transitions between segments.

Properties

Name Meaning
Video Url A valid URL pointing to the source video to be processed.
Video Highlights JSON array of objects specifying highlight segments with their time ranges and reasons. Example format:
json<br>[{"highlight_reason": "Introduction", "highlight_time": "00:00 - 00:10"}, {"highlight_reason": "Main event", "highlight_time": "01:00 - 01:30"}]<br>
Add Transitions Boolean flag indicating whether to add transitions between trimmed video segments.
Transition Type Type of transition effect to apply between segments if transitions are enabled. Options: 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. 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 applying transitions.
  • 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 highlight objects. Invalid JSON will cause parsing errors.
  • Transition Errors: If transitions are enabled but the type or duration is invalid, the node may fail to apply effects. Use supported transition types and reasonable durations.
  • API Authentication Failures: Verify that the API key credential is correctly configured and has permissions for video processing operations.
  • Timeouts or Large Videos: Processing very large videos or many highlight segments might lead to timeouts or performance issues. Consider splitting tasks or reducing segment count.

Links and References

Discussion