Node / Video Ffmpeg · guide
Effects, colour & overlays
Current Apexify.js 6.0.0 documentation for Effects, colour & overlays.
See also: Visual filters & overlays · Text overlays (addTextOverlay recommended; legacy addText / addAnimatedText below are deprecated).
applyEffects
Sequential -vf filters (comma-separated).
type | Parameter | FFmpeg mapping |
|---|---|---|
blur | intensity (default 5) | boxblur= |
brightness | value (−100…100) | eq=brightness=value/100 |
contrast | value | eq=contrast=1+value/100 |
saturation | value | eq=saturation=1+value/100 |
grayscale | — | hue=s=0 |
sepia | — | colorchannelmixer=… preset matrix |
invert | — | negate |
sharpen | intensity (default 1) | unsharp=5:5:intensity:… |
noise | intensity (default 20) | noise=alls=intensity:allf=t+u |
colorCorrect
Uses eq, hue, colorbalance for warmth.
| Field | Mapping |
|---|---|
brightness | eq=brightness=brightness/100 |
contrast | eq=contrast=1+contrast/100 |
saturation | eq=saturation=1+saturation/100 |
hue | hue=h=hue (degrees) |
temperature | colorbalance offsets (positive = warmer, negative = cooler heuristic). |
outputPath | ✓ |
applyLUT
Applies 3D LUT file (.cube typical).
| Field | Notes |
|---|---|
lutPath | Resolved vs cwd when not URL. |
intensity | Present in types — blend strength not wired in helper today (reserved). |
outputPath | ✓ — re-encodes libx264 -crf 18. |
addWatermark
Second input image overlaid with alpha multiplier.
| Field | Default | Notes |
|---|---|---|
watermarkPath | ✓ | Local path (non-URL resolved vs cwd). |
position | bottom-right | top-left, top-right, bottom-left, bottom-right, center. |
opacity | 0.5 | colorchannelmixer=aa= |
size | native | scale=w:h before overlay. |
outputPath | ✓ |
addText
Static drawtext (requires FFmpeg default font / OS fonts).
| Field | Default |
|---|---|
text | ✓ |
position | bottom-center |
fontSize | 24 |
fontColor | white |
backgroundColor | black@0.5 (drawtext box) |
startTime, endTime | Omit → always on |
outputPath | ✓ |
Colon : and ' escaped for ffmpeg filter syntax.
addFade
Video fade (-vf fade). Audio untouched.
| Field | Notes |
|---|---|
fadeIn | Seconds from t=0. |
fadeOut | Ends duration - fadeOut when duration known via getVideoInfo. |
outputPath | ✓ |
addAnimatedText
Drawtext with enable=between(start,end).
Position
Either named (same set as addText minus finer granularity) or { x, y } pixel coords.
animation — type vs runtime
VideoCreationOptions union | Actually honoured in addAnimatedTextToVideo |
|---|---|
fadeIn, fadeOut, … | Implementation checks fade and slide only — extra expressions appended to drawtext. |
| Missing / others | Static visibility window only. |
Working animated keywords today: fade, slide (plus none / omitted).
fontPath, fontName, fontFamily appear on VideoCreationOptions but are not injected into the FFmpeg drawtext filter in addAnimatedTextToVideo today (reserved). addText uses the same limitation — system default font only unless you extend the helper.