npm package: @saitrogen/n8n-nodes-ffmpeg
Description: Community-maintained n8n nodes for FFmpeg actions.
Author: saitrogen
Latest version: 0.0.3

# n8n FFmpeg Node

This n8n node allows you to execute FFmpeg commands for video and audio manipulation.


## Features

*   **Custom FFmpeg Command:** Allows users to execute any FFmpeg command.
*   **Video Conversion:** Provides options for converting video files with different codecs and resolutions.
*   **Audio Extraction:** Extracts audio from video files with various codecs and bitrates.
*   **Video Resizing:** Resizes video files to a specified resolution.

## Node Features

*   **Node Name:** FFmpeg
*   **Display Name:** FFmpeg
*   **Description:** Executes FFmpeg commands for video and audio manipulation.
*   **Icon:** (Placeholder - will be a black rectangle with "FFmpeg" text)
*   **Group:** Transform
*   **Input:**
    *   `main`: Accepts input data from the previous node.
*   **Output:**
    *   `main`: Returns the output of the FFmpeg command. The output data will contain:
        *   `stdout`: The standard output of the FFmpeg command.
        *   `stderr`: The standard error of the FFmpeg command.
*   **Properties:**
    *   `FFmpeg Command Type` (options):
        *   Select the type of FFmpeg command to execute.
        *   Options:
            *   Custom Command
            *   Video Conversion
            *   Audio Extraction
            *   Video Resizing
    *   `FFmpeg Command` (string): (Shown if "Custom Command" is selected)
        *   The complete FFmpeg command to execute. Use this for advanced or custom operations.
    *   `Input File` (string): (Shown if "Video Conversion", "Audio Extraction", or "Video Resizing" is selected)
        *   The path to the input video or audio file.
    *   `Output File` (string): (Shown if "Video Conversion", "Audio Extraction", or "Video Resizing" is selected)
        *   The path to the output file.
    *   `Video Codec` (options): (Shown if "Video Conversion" is selected)
        *   The video codec to use for conversion.
        *   Options: Copy, libx264, libx265
    *   `Audio Codec` (options): (Shown if "Video Conversion" is selected)
        *   The audio codec to use for conversion.
        *   Options: Copy, aac, mp3
    *   `Audio Bitrate` (string): (Shown if "Video Conversion" or "Audio Extraction" is selected)
        *   The audio bitrate to use for conversion or extraction.
    *   `Video Resolution` (string): (Shown if "Video Conversion" or "Video Resizing" is selected)
        *   The desired video resolution (widthxheight).

## Example Use Cases

*   Video Conversion: Convert a video from one format to another.
*   Video Resizing: Resize a video to a specific resolution.
*   Audio Extraction: Extract the audio from a video file.

## Troubleshooting

*   **FFmpeg Installation:** Ensure FFmpeg is installed and accessible from the command line.
*   **File Paths:** Verify file paths are correct and accessible to n8n.
*   **Permissions:** Ensure n8n has read/write permissions.
*   **Command Syntax:** Double-check FFmpeg command syntax.
*   **Error Messages:** Check `stderr` in the output for errors.
*   **Node Not Found:** Restart n8n and check logs.
*   **Dependencies:** Run `npm install` in the project directory.

## License

MIT