Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

Node / Video Ffmpeg · guide

Visual filters, colour & watermark

Current Apexify.js 6.0.0 documentation for Visual filters, colour & watermark.

apexify.jsRuntime: nodeCURRENTSince 6.0.0

applyEffects

What it does: Runs a chain of FFmpeg -vf filters left-to-right.

Each filters[] entry

typeintensity / valueVisual effect
blurintensity default 5boxblur — soft focus; higher = soupier.
brightnessvalue −100…100eq=brightness=value/100 — shifts exposure mid-tones.
contrastvalueeq=contrast=1+value/100 — 100 doubles contrast slope vs neutral.
saturationvalueeq=saturation=1+value/100 — −100 → grayscale via zero sat if paired; grayscale type also exists.
grayscale—hue=s=0
sepia—Sepia colorchannelmixer preset.
invert—negate — colour negative.
sharpenintensity default 1unsharp — edge emphasis; too high = halos.
noiseintensity default 20noise film grain style.
SOURCEtypescript
typescript
Studio
await painter.createVideo({  source: './flat.mp4',  applyEffects: {    outputPath: './styled.mp4',    filters: [      { type: 'contrast', value: 15 },      { type: 'saturation', value: -10 },      { type: 'sharpen', intensity: 1.1 },    ],  },});

colorCorrect

What it does: eq, hue, colorbalance — finer than applyEffects for grading-style tweaks.

FieldFFmpeg mappingEffect
brightnesseq=brightness=brightness/100Shift exposure around mid-grey.
contrasteq=contrast=1+contrast/100Stretch tonal range.
saturationeq=saturation=1+saturation/100Colour intensity.
huehue=h=hueRotate hues (degrees).
temperaturecolorbalance offsetsWarmer/cooler cast via RGB gains.
outputPath✓
SOURCEtypescript
typescript
Studio
await painter.createVideo({  source: './log-flat.mp4',  colorCorrect: {    brightness: 5,    contrast: 8,    saturation: 12,    hue: 0,    temperature: 12,    outputPath: './warm-grade.mp4',  },});

applyLUT

What it does: Applies a 3D LUT (.cube). Re-encodes video (libx264, -crf 18).

FieldEffect
lutPathPath resolved vs cwd; must exist.
intensityDeclared in types — blend not wired in helper (ignored today).
outputPath✓
SOURCEtypescript
typescript
Studio
await painter.createVideo({  source: './flat-log.mp4',  applyLUT: {    lutPath: './luts/cinematic.cube',    outputPath: './graded.mp4',  },  onProgress: (p) => console.log(p.percent),});

addWatermark

What it does: Overlays a second image (PNG with alpha ideal) with configurable position and alpha.

FieldDefaultEffect
watermarkPath✓Resolved locally (non-URL joined with cwd).
positionbottom-rightAnchor corner / centre.
opacity0.5colorchannelmixer=aa= on overlay plane.
sizenativescale=w:h before composite.
outputPath✓
SOURCEtypescript
typescript
Studio
await painter.createVideo({  source: './lesson.mp4',  addWatermark: {    watermarkPath: './logo.png',    position: 'top-left',    opacity: 0.7,    size: { width: 160, height: 160 },    outputPath: './lesson-branded.mp4',  },});

addFade

What it does: Video-only fade in/out (-vf fade). Audio not ducked here.

FieldEffect
fadeInSeconds of fade from black at start.
fadeOutFade to black ending fadeOut seconds before EOF (uses probed duration).
outputPath✓
SOURCEtypescript
typescript
Studio
await painter.createVideo({  source: './chapter.mp4',  addFade: {    fadeIn: 0.8,    fadeOut: 1.2,    outputPath: './chapter-soft.mp4',  },});

Next steps