ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Overview

This node provides video transcoding functionality using ffmpeg. It allows users to convert input videos into different formats or codecs, adjust video bitrate, frame rate, and resolution. This is useful for preparing videos for various platforms, optimizing file size, or ensuring compatibility with specific devices.

Common scenarios include:

  • Converting a raw video file into a web-friendly format.
  • Reducing video bitrate and resolution to save bandwidth.
  • Changing the codec of a video to meet platform requirements.

For example, a user can input a video URL or binary data, specify the desired output codec (e.g., H.264), set a target bitrate and resolution, and receive a transcoded video ready for upload or streaming.

Properties

Name Meaning
Video Input A valid video URL or the name of the input binary field containing the video to transcode.
Video Output Name The name of the output binary field where the transcoded video file will be stored.
Video Codec The codec to use for transcoding the video (e.g., h264, vp9).
Transcoding Options Collection of optional parameters:
- Video Bitrate: Target bitrate in kbps (number).
- Fram Rate: Frames per second (number).
- Resolution: Target resolution as width x height string (e.g., "640x480").

Output

The node outputs the transcoded video in a binary field named as specified by the "Video Output Name" property. The json output contains metadata about the operation but primarily the binary data holds the resulting video file.

If the input was binary, the output binary field will contain the transcoded video file encoded with the selected codec and options.

Dependencies

  • Requires an API key credential for accessing the underlying ffmpeg service.
  • The node depends on an external ffmpeg processing backend accessible via this credential.
  • No additional environment variables are explicitly required from the static code.

Troubleshooting

  • Invalid video input: If the input URL or binary field does not contain a valid video, transcoding will fail. Ensure the input is correct and accessible.
  • Unsupported codec: Specifying an unsupported video codec may cause errors. Use common codecs supported by ffmpeg.
  • Incorrect transcoding options: Providing invalid values for bitrate, frame rate, or resolution might lead to failure or unexpected results. Verify these values are numeric and properly formatted.
  • API authentication errors: Missing or incorrect API credentials will prevent the node from functioning. Confirm the API key is configured correctly in n8n credentials.
  • Timeouts or large files: Very large videos may cause timeouts or memory issues depending on the backend limits.

Links and References

Discussion