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 with customizable parameters such as video codec, bitrate, frame rate, and resolution. This is useful for scenarios like preparing videos for web streaming, reducing file size, or converting videos to a format compatible with specific devices.

For example, you can input a video URL or binary video data, specify the desired output codec (e.g., H.264), set the target resolution (e.g., 640x480), and get a transcoded video file ready for use in your workflow.

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 settings:
- Video Bitrate: Target bitrate for the video (number).
- Fram Rate: Frames per second (number).
- Resolution: Target resolution in width x height format (string, e.g., "640x480").

Output

The node outputs the transcoded video file 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 field holds the actual transcoded video content.

If the input was binary video data, the output binary field will contain the transcoded video file. If the input was a URL, the node downloads and processes the video, then outputs the transcoded result similarly.

Dependencies

  • Requires an API key credential for accessing the underlying ffmpeg service.
  • The node depends on an external ffmpeg processing backend accessible via API.
  • Proper configuration of this API credential in n8n is necessary for the node to function.

Troubleshooting

  • Common issues:

    • Invalid or unreachable video input URL.
    • Unsupported video codec or invalid codec string.
    • Incorrect resolution format (should be WIDTHxHEIGHT).
    • Missing or misconfigured API authentication token.
  • Error messages:

    • "Failed to fetch video input": Check the input URL or binary field name.
    • "Unsupported codec": Verify the codec string matches supported codecs.
    • "Invalid resolution format": Ensure resolution is provided as "widthxheight".
    • Authentication errors: Confirm the API key credential is correctly set up.

Resolving these typically involves verifying input parameters and ensuring the API credentials are valid and active.

Links and References

Discussion