ffmpeg Node icon

ffmpeg Node

n8n Node for some Ffmpeg functionality

Actions11

Overview

This node provides audio transcoding functionality using ffmpeg. It allows users to convert audio files from one format or codec to another, adjusting parameters such as codec type, bitrate, and number of audio channels. This is useful in scenarios where audio files need to be standardized for compatibility, optimized for size or quality, or prepared for specific playback environments.

Practical examples include:

  • Converting an MP3 file to AAC with a specific bitrate for mobile streaming.
  • Downmixing stereo audio to mono to reduce file size.
  • Changing the audio codec to match requirements of a target platform or device.

Properties

Name Meaning
Audio Input A valid URL pointing to the audio file or the name of the input binary field containing the audio data.
Audio Output Name The name of the output binary field where the transcoded audio file will be stored.
Audio Codec The codec to use for transcoding the audio (e.g., "aac", "mp3", "flac").
Transcoding Options Additional options for transcoding:
• Audio Bitrate (number, e.g., 128)
• Audio Channels (number, e.g., 1 for mono)

Output

The node outputs the transcoded audio file in a binary field named as specified by the "Audio Output Name" property. The json output typically contains metadata about the operation or the processed item, but the main content is the binary audio data ready for further use or storage.

If the input was binary audio data, the output binary field will contain the transcoded audio file. If the input was a URL, the node downloads and transcodes the audio, then outputs it similarly.

Dependencies

  • Requires an API key credential for accessing the underlying ffmpeg service.
  • Relies on ffmpeg functionality exposed via an external API or service configured in n8n.
  • Network access may be needed if the audio input is provided as a URL.

Troubleshooting

  • Invalid Audio Input: Ensure the input is either a valid URL accessible from the node environment or a correctly named binary field containing audio data.
  • Unsupported Codec: Using an unsupported or misspelled audio codec can cause errors. Verify codec names are correct and supported by the underlying ffmpeg service.
  • Bitrate or Channel Errors: Providing invalid values (e.g., negative numbers) for bitrate or channels may cause failures. Use positive integers within typical ranges.
  • API Authentication Failures: Check that the API key credential is correctly configured and has necessary permissions.
  • Timeouts or Network Issues: When using URLs, ensure the source is reachable and responsive.

Links and References

Discussion