mediafx

N8N custom nodes for video editing and media processing (Enhanced fork with Speed control and Subtitle fixes)

Package Information

Downloads: 77 weeklyย /ย 1,090 monthly
Latest Version: 1.6.35
Author: Lee-Jisoo

Documentation

@lee-jisoo/n8n-nodes-mediafx

NPM Version
License: MIT
N8N Community Node

Enhanced fork of n8n-nodes-mediafx with additional features and bug fixes.

This is a custom n8n node for comprehensive, local media processing using FFmpeg. It allows you to perform a wide range of video, audio, image, and text operations directly within your n8n workflows without needing any external API or service.

Buy Me A Coffee

๐Ÿ†• What's New in This Fork

v1.6.35

Bug Fixes

  • ๐Ÿ”Š Mix Audio (Audio-Speed mode): Fixed infinite execution caused by tpad generating endless video stream
  • ๐Ÿ“ฆ Package size reduced from ~12MB to ~6MB by removing duplicate font files

v1.6.34

Bug Fixes

  • ๐Ÿ”Š Mix Audio (Audio-Speed mode): Fixed last portion of audio being silenced
    • Changed amix duration to shortest so output ends when secondary audio ends

v1.6.33

Bug Fixes

  • ๐Ÿ”Š Mix Audio (Audio-Speed mode): Fixed audio being cut off ~1 second before the end
    • Added tpad to prevent video stream from ending before audio
    • Added apad/atrim to stabilize video audio stream length

v1.6.30

Improvements

  • ๐Ÿงน Temp File Cleanup: Now runs on every execution instead of 10% probability
    • More reliable cleanup of orphaned temporary files
    • Files older than 24 hours are automatically removed
    • Reduces disk space usage from crashed/interrupted workflows

v1.6.29

New Features

  • ๐Ÿ“ Extended Auto Font Size: Added larger size options

    • Auto - Extra Large: 110% of calculated size
    • Auto - Huge: 120% of calculated size
    • Auto - Maximum: 130% of calculated size
  • ๐ŸŽจ Per-Line Color Support: Different colors for each line in multi-line text

    • Enable Line Colors toggle
    • Line 1 Color and Line 2 Color options
    • Lines 3+ automatically use Line 1 color
  • ๐ŸŽฌ Match Audio Length (Mix Audio): Two new output length options

    • Match Audio (Loop/Trim Video): Loop video if shorter, trim if longer than audio
    • Match Audio (Adjust Speed): Adjust video playback speed to exactly match audio duration

v1.6.28

New Features

  • ๐Ÿ“ Multi-line Center Alignment: Each line is individually centered
    • Works with older FFmpeg versions (no text_align dependency)
    • Each line rendered as separate drawtext filter
    • Line spacing option supported

v1.6.27

Improvements

  • ๐Ÿ”ง FFmpeg Bundling Fix: Now uses ffmpeg-static (FFmpeg 5.x) as primary source
    • More reliable cross-platform support
    • Fixes issues with old system FFmpeg being used instead of bundled version

v1.6.26

New Features

  • ๐Ÿ“ Auto Font Size: Automatically calculate font size based on image dimensions

    • Auto - Small: Fits text at 50% of calculated size
    • Auto - Medium: Fits text at 75% of calculated size
    • Auto - Large: Fits text at 100% (fills available width)
    • Supports Korean/CJK characters with proper width weighting
  • ๐Ÿ˜€ Emoji Auto-Removal: Automatically removes emojis from text

    • Prevents broken/garbled characters in rendered output
    • Emojis are stripped before rendering
  • โ†•๏ธ Line Spacing: Adjustable spacing between lines

    • Default 10px, configurable for multi-line text
  • ๐Ÿ“ Multi-line Text Alignment: Text alignment for multi-line text

    • Left, Center, Right alignment options

v1.6.24

Bug Fixes

  • ๐Ÿ› Add Text to Image Fix: Fixed "Unable to find a suitable output format" error
    • Issue occurred when input image was downloaded from URL without file extension
    • Now automatically detects actual image format using ffprobe
    • Properly outputs correct format (JPEG, PNG, etc.) regardless of input file extension

v1.6.21

New Features

  • ๐Ÿ–ผ๏ธ Add Text to Image: Overlay text onto static images
    • Font selection (bundled, user-uploaded, system fonts)
    • Text styling: size, color
    • Outline: configurable width and color for text border
    • Background Box: optional background with color, opacity, and padding
    • Positioning: alignment-based (9-point grid) or custom X/Y coordinates
    • Output format matches input image format (PNG, JPG, etc.)

v1.6.20

New Features

  • ๐Ÿ” Get Metadata (Probe): Extract comprehensive metadata from video/audio files

    • Format info: filename, format, duration, size, bitrate
    • Video stream: codec, resolution, frame rate, aspect ratio, pixel format
    • Audio stream: codec, sample rate, channels, channel layout
    • Tags: title, artist, album, and other embedded metadata
  • ๐Ÿ”ค System Font Support: Use fonts installed on your system

    • System fonts automatically appear in Font dropdown (Text/Subtitle operations)
    • Supports macOS, Linux, and Windows system font directories
    • Use Font > List with "Include System Fonts" to browse all available fonts

v1.6.14

Subtitle Enhancements (v1.6.1 ~ v1.6.14)

  • ๐ŸŽจ Background Box Padding: Fixed text sticking to background box edges

    • Added horizontal padding (\h hard spaces) when background is enabled
    • Padding automatically scales with font size
  • ๐ŸŽฏ Full ASS Format Support: Complete subtitle styling overhaul

    • SRT to ASS auto-conversion for advanced styling
    • Dynamic video resolution detection (supports vertical videos like 1080x1920)
    • Proper BorderStyle=3 implementation for opaque background boxes
    • Fixed background color transparency with correct Outline=0, Shadow=1 settings
  • ๐Ÿ“ Flexible Positioning:

    • 9-point alignment grid (top/middle/bottom ร— left/center/right)
    • Customizable padding (X/Y margins)
    • Outline width and color options

v1.6.0

  • ๐ŸŽฌ Speed Operation: Adjust video playback speed (slow motion or fast forward)

    • Speed range: 0.25x to 4x
    • Option to adjust audio speed along with video
    • Option to maintain original audio pitch
    • Output format selection (MP4, MOV, AVI, MKV)
  • ๐Ÿ› Subtitle Bug Fix: Fixed subtitle display issue with slideshow/image-sequence videos

    • Changed from drawtext filter chain to subtitles filter
    • The original drawtext filter's enable='between(t,X,Y)' was unreliable with image-sequence videos
    • Now uses FFmpeg's native SRT parsing for correct timing

Why use this fork?

  • Speed Control: Easily create slow-motion or fast-forward videos
  • Reliable Subtitles: Fixed critical bug where subtitles were dropped on slideshow videos
  • All original features from n8n-nodes-mediafx included

Installation

Via n8n Community Nodes (Recommended)

  1. Go to Settings > Community Nodes
  2. Click Install
  3. Enter @lee-jisoo/n8n-nodes-mediafx
  4. Click Install

Manual Installation

cd ~/.n8n/nodes
npm install @lee-jisoo/n8n-nodes-mediafx
# Restart n8n

Docker Installation

# In your Dockerfile
RUN cd /home/node/.n8n/nodes && npm install @lee-jisoo/n8n-nodes-mediafx

โš ๏ธ Troubleshooting

Node not working after upgrade

If the node doesn't work properly after upgrading to a new version, try uninstalling and reinstalling the plugin:

Via n8n Community Nodes:

  1. Go to Settings > Community Nodes
  2. Find @lee-jisoo/n8n-nodes-mediafx and click Uninstall
  3. Restart n8n
  4. Go to Settings > Community Nodes again
  5. Click Install and enter @lee-jisoo/n8n-nodes-mediafx
  6. Restart n8n

Manual Installation:

cd ~/.n8n/nodes
npm uninstall @lee-jisoo/n8n-nodes-mediafx
npm install @lee-jisoo/n8n-nodes-mediafx
# Restart n8n

Features

Video Operations

Operation Description
Merge Combine multiple videos into one
Trim Cut video to specific start/end time
Speed Adjust playback speed (0.25x - 4x) โญ NEW
Transition Apply transition effects between videos
Fade Apply fade in/out effects
Separate Audio Split into muted video + audio track
Overlay Video Overlay video on top of another

Audio Operations

Operation Description
Extract Extract audio from video (MP3, WAV, AAC, FLAC)
Mix Mix audio tracks with volume control, partial mixing, looping, fade effects, match audio length โญ NEW

Image Operations

Operation Description
Add Text Overlay text on image with styling, outline, background box โญ NEW
Image to Video Create video from image with custom duration
Stamp Image Add watermark with position, size, rotation, opacity, time control

Text/Subtitle Operations

Operation Description
Add String Burn text overlay with styling
Add Subtitle Add subtitles from SRT file โญ FIXED

Probe Operations

Operation Description
Get Metadata Extract metadata from video/audio files (format, streams, tags)

Font Operations

Operation Description
List Get available fonts
Upload Upload custom fonts (TTF, OTF)
Delete Remove uploaded fonts

Usage Examples

Add Text to Image (New!)

Overlay text on an image with styling:

{
  "resource": "image",
  "operation": "addTextToImage",
  "sourceImageText": {
    "source": { "sourceType": "binary", "binaryProperty": "data" }
  },
  "imageText": "Hello, World!",
  "imageTextFontKey": "noto-sans-kr",
  "imageTextSize": 48,
  "imageTextColor": "white",
  "imageTextOutlineWidth": 2,
  "imageTextOutlineColor": "black",
  "imageTextPositionType": "alignment",
  "imageTextHorizontalAlign": "center",
  "imageTextVerticalAlign": "bottom",
  "imageTextPaddingY": 50
}

With background box:

{
  "resource": "image",
  "operation": "addTextToImage",
  "imageText": "Caption Text",
  "imageTextEnableBackground": true,
  "imageTextBackgroundColor": "black",
  "imageTextBackgroundOpacity": 0.7,
  "imageTextBoxPadding": 10
}

Get Media Metadata

Extract metadata from video or audio files:

{
  "resource": "probe",
  "operation": "getMetadata",
  "probeSource": {
    "source": { "sourceType": "binary", "binaryProperty": "data" }
  }
}

Example output:

{
  "success": true,
  "operation": "getMetadata",
  "format": {
    "filename": "video.mp4",
    "formatName": "mov,mp4,m4a,3gp,3g2,mj2",
    "duration": 120.5,
    "size": 15728640,
    "bitRate": 1048576
  },
  "video": {
    "codec": "h264",
    "width": 1920,
    "height": 1080,
    "frameRate": 30,
    "aspectRatio": "16:9"
  },
  "audio": {
    "codec": "aac",
    "sampleRate": 48000,
    "channels": 2,
    "channelLayout": "stereo"
  },
  "hasVideo": true,
  "hasAudio": true
}

Using System Fonts (New!)

System fonts are automatically available in the Font dropdown. Just select any font with (system) suffix:

{
  "resource": "subtitle",
  "operation": "addSubtitle",
  "fontKey": "system-helvetica",
  "size": 48,
  "color": "white"
}

To browse all system fonts, use Font > List:

{
  "resource": "font",
  "operation": "list",
  "filterOptions": {
    "includeSystemFonts": true,
    "fontType": "system"
  }
}

Speed Adjustment

Create a 2x speed video:

{
  "resource": "video",
  "operation": "speed",
  "speedSource": {
    "source": { "sourceType": "binary", "binaryProperty": "data" }
  },
  "speed": 2,
  "adjustAudio": true,
  "maintainPitch": false,
  "speedOutputFormat": "mp4"
}

Create slow-motion (0.5x):

{
  "resource": "video",
  "operation": "speed",
  "speed": 0.5,
  "adjustAudio": true
}

Add Subtitles (Fixed!)

Works correctly with slideshow/image-sequence videos:

{
  "resource": "subtitle",
  "operation": "addSubtitle",
  "source": {
    "source": { "sourceType": "binary", "binaryProperty": "video" }
  },
  "subtitleFileSource": {
    "source": { "sourceType": "binary", "binaryProperty": "srt" }
  },
  "fontKey": "noto-sans-kr",
  "size": 48,
  "color": "white",
  "horizontalAlign": "center",
  "verticalAlign": "bottom"
}

Requirements

  • n8n: Version 1.0+
  • Node.js: Version 16+
  • FFmpeg: Auto-installed via @ffmpeg-installer/ffmpeg

Manual FFmpeg Installation (if needed)

Ubuntu/Debian:

sudo apt update && sudo apt install ffmpeg

Alpine (Docker):

apk add ffmpeg

macOS:

brew install ffmpeg

Credits

This is an enhanced fork of n8n-nodes-mediafx by Dante.

Original Author: Dante (datapod.k@gmail.com)
Fork Maintainer: Lee-Jisoo (mihisasi@naver.com)

Repository

License

MIT

Discussion