ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Overview

This node provides video and audio processing capabilities using ffmpeg. Specifically, the "Cut Video/Audio" operation allows users to trim a segment from a given video or audio file by specifying start and end times in seconds. This is useful for extracting highlights, removing unwanted sections, or creating clips from longer media files.

Common scenarios include:

  • Extracting a specific scene from a recorded video.
  • Trimming silence or noise from an audio recording.
  • Creating short promotional clips from longer videos.

For example, if you have a 10-minute video but only want the segment from 2:00 to 3:30, this node can cut that portion and output it as a new media file.

Properties

Name Meaning
Video or Audio Input A valid URL pointing to the input video or audio file, or the name of the binary field containing the media.
Cut Start Time (in Sec) The starting point (in seconds) from which to begin cutting the media. Must be ≥ 0.
Cut End Time (in Sec) The ending point (in seconds) at which to stop cutting the media. Must be ≥ 0 and greater than start time.
Video or Audio Output Name The name of the output binary field where the resulting trimmed media file will be stored.

Output

The node outputs the trimmed video or audio segment in a binary data field named as specified by the user (default is "data"). The output binary data contains the media file corresponding to the cut segment defined by the start and end times.

The json output field typically includes metadata about the processed item, but the main content is the binary media file representing the cut clip.

Dependencies

  • Requires an API key credential for accessing the underlying ffmpeg service.
  • The node depends on ffmpeg functionality exposed via an external API or service configured within n8n.
  • Proper configuration of the API authentication token or credentials is necessary for the node to function.

Troubleshooting

  • Invalid Input URL or Binary Field: Ensure the input media URL is accessible or the binary field name is correct and contains valid media data.
  • Start and End Times: The start time must be less than the end time, and both should be non-negative. Errors may occur if these constraints are violated.
  • API Authentication Errors: If the node fails due to authentication, verify that the API key or token is correctly set up in n8n credentials.
  • Unsupported Media Format: The input media must be in a format supported by ffmpeg. Unsupported formats may cause processing failures.
  • Timeouts or Large Files: Cutting very large files or long segments might lead to timeouts or performance issues depending on the backend service limits.

Links and References

Discussion