MediaFX icon

MediaFX

Process videos, audio, and media files with FFmpeg

Actions13

Overview

The node provides video processing capabilities using FFmpeg, focusing here on the Trim operation for videos. It allows users to cut a segment from a video by specifying start and end times in seconds. This is useful when you want to extract a specific portion of a video without manually editing it outside n8n.

Common scenarios:

  • Extracting highlights or clips from longer videos.
  • Removing unwanted sections at the beginning or end of a video.
  • Preparing shorter previews or teasers from full-length videos.

Practical example:
You have a 5-minute video hosted online, but only want to use the segment from 30 to 45 seconds. Using this node's Trim operation, you specify the source URL and set start time to 30 and end time to 45 seconds. The node outputs the trimmed clip ready for further workflow steps.


Properties

Name Meaning
Video Source Defines the input video to trim. Options:
- Source Type Choose between "URL" (video accessible via web link) or "Binary Data" (video data from previous node).
- Value If Source Type is URL, provide the direct video URL (e.g., https://example.com/video.mp4).
- Binary Property If Source Type is Binary Data, specify the binary property name containing the video data (default: "data").
Start Time (seconds) The starting point in seconds from which to begin trimming the video (default: 0).
End Time (seconds) The ending point in seconds at which to stop trimming the video (default: 10).

Output

The node outputs the trimmed video as binary data attached to the output item under the binary property named "data". The JSON part of the output is empty ({}).

  • json: Empty object {}.
  • binary: Contains the trimmed video file data, ready for saving or passing to other nodes that accept binary media.

Dependencies

  • Requires FFmpeg installed and accessible in the environment where n8n runs, as the node uses FFmpeg commands internally to process video files.
  • Supports input videos either from URLs or from binary data passed from previous nodes.
  • No external API keys or services are required for the trim operation itself.

Troubleshooting

  • No binary data found error: When using binary input, ensure the specified binary property exists and contains valid video data.
  • File not found or inaccessible URL: Verify the URL is correct and publicly accessible if using URL input.
  • Invalid start/end times: Ensure start time is less than end time and both are within the video's duration.
  • FFmpeg errors: Confirm FFmpeg is installed and properly configured in your environment.
  • Operation did not produce an output: This may indicate an internal failure during trimming; check logs for FFmpeg error details.

Links and References


If you need more details about other operations or resources, feel free to ask!

Discussion