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 video.
  • Creating audio snippets from podcasts or music tracks.
  • Trimming recordings to remove silence or irrelevant parts.

For example, a user can input a full-length video URL or binary data, specify start time as 30 seconds and end time as 90 seconds, and receive a trimmed video clip of that 1-minute segment.

Properties

Name Meaning
Video or Audio Input A valid video or audio URL, or the name of the input binary field containing the media file.
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.
Video or Audio Output Name The name of the output binary field where the resulting cut media file will be stored.

Output

The node outputs the trimmed video or audio segment in a binary field named as specified by the user (default is "data"). The json output contains metadata about the processed item, but the main content is the binary data representing the cut media file.

If the input was binary data, the output binary field will contain the corresponding trimmed media file. If the input was a URL, the node downloads and processes the media before outputting the trimmed result.

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 in n8n credentials.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Invalid Input: Errors may occur if the input URL is invalid or the binary field does not contain a proper media file. Ensure the input is accessible and correctly referenced.
  • Start/End Time Issues: Setting the start time greater than or equal to the end time will likely cause errors or empty output. Verify that start < end and both are within the media duration.
  • API Authentication Failures: Missing or incorrect API credentials will prevent processing. Confirm the API key is set up properly in n8n credentials.
  • Unsupported Media Format: If the media format is not supported by ffmpeg, the node may fail. Use common formats like MP4, MP3, WAV, etc.

Links and References

Discussion