ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Overview

This node provides video processing capabilities specifically for adding subtitles to videos. It supports two subtitle embedding methods:

  • Softcoded: Subtitles are added as a separate selectable track, allowing viewers to toggle them on or off.
  • Hardcoded: Subtitles are permanently burned into the video frames.

Common scenarios include enhancing accessibility by adding subtitles to videos, preparing content for platforms that require embedded subtitles, or providing multiple subtitle options without altering the original video stream.

For example, you can input a video file and a subtitle file (such as an SRT file), choose whether to hardcode or softcode the subtitles, optionally adjust video bitrate, frame rate, and resolution, and receive a processed video with subtitles embedded accordingly.

Properties

Name Meaning
Video Input A valid video URL or the name of the input binary field containing the video file.
Subtitle Input A valid subtitle file URL or the name of the input binary field containing the subtitle file.
Video Output Name The name of the output binary field where the processed video file with subtitles will be stored.
Add Method Method to add subtitles: Softcoded (subtitles as a selectable track) or Hardcoded (burned in).
Video Processing Options Optional settings including:
- Video Bitrate (number)
- Frame Rate (fps) (number)
- Resolution (string, e.g., "640x480")

Output

The node outputs a binary video file with subtitles added according to the selected method. The processed video is available in the specified output binary field name.

  • The json output contains metadata about the operation result (not detailed in the source).
  • The binary output holds the actual video file with subtitles embedded either softly or hardcoded.

Dependencies

  • Requires an API key credential for the underlying ffmpeg service or API.
  • Relies on ffmpeg functionality exposed via an external service or API configured in n8n credentials.
  • No other external dependencies are indicated in the provided code.

Troubleshooting

  • Invalid Input URLs or Binary Fields: Ensure that the video and subtitle inputs are correctly specified as valid URLs or existing binary fields; otherwise, the node may fail to fetch or process files.
  • Unsupported Subtitle Formats: Using unsupported subtitle file formats might cause errors or unexpected results.
  • Incorrect Output Field Name: If the output binary field name conflicts with existing data or is missing, the output may not be accessible.
  • API Authentication Errors: Missing or invalid API credentials will prevent the node from executing successfully.
  • Video Processing Parameters: Setting unrealistic video bitrate, frame rate, or resolution values could lead to processing failures or poor output quality.

Links and References

Discussion