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 to keep the segment from 2 minutes to 3 minutes 30 seconds, this node can cut that portion out and output it as a new media file.

Properties

Name Meaning
Video or Audio Input A valid URL pointing to the video/audio file or the name of the input binary field containing the media to be processed.
Cut Start Time (in Sec) The starting point (in seconds) from which to begin cutting the media. Must be zero or positive.
Cut End Time (in Sec) The ending point (in seconds) at which to stop cutting the media. Must be zero or positive.
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 file in a binary data field named according to the "Video or Audio Output Name" property (default is "data"). The output contains the media segment between the specified start and end times.

The json output field typically includes metadata about the processed file, such as filename, mime type, and possibly duration, depending on implementation details.

If the input was binary data, the output will be binary data representing the trimmed media segment.

Dependencies

  • Requires an API key credential for accessing the underlying ffmpeg service or API.
  • The node depends on ffmpeg functionality exposed via an external service or API configured in n8n credentials.
  • No additional environment variables are explicitly required based on the static code analysis.

Troubleshooting

  • Invalid Input: If the input URL or binary field name is incorrect or inaccessible, the node will fail to retrieve the media. Ensure the input is valid and accessible.
  • Start/End Time Errors: Providing a start time greater than the end time or negative values may cause errors. Always ensure start ≤ end and both are ≥ 0.
  • Unsupported Formats: If the media format is not supported by the underlying ffmpeg service, the node may throw an error.
  • Output Field Conflicts: Make sure the output binary field name does not conflict with existing fields in the workflow to avoid overwriting data unintentionally.

Links and References

Discussion