Node / Video Ffmpeg · guide
Presets, transitions, stabilize & batch caveats
Current Apexify.js 6.0.0 documentation for Presets, transitions, stabilize & batch caveats.
See also: Transcode & export presets (exportPreset, convert, compress) · Transitions & stabilize · Progress callback.
exportPreset
Calls convertVideo with fixed resolution / fps / bitrate / format presets.
preset | Resolution | FPS | Bitrate (kbps) | Format |
|---|---|---|---|---|
youtube | 1920×1080 | 30 | 8000 | mp4 |
instagram | 1080×1080 | 30 | 3500 | mp4 |
tiktok | 1080×1920 | 30 | 4000 | mp4 |
twitter | 1280×720 | 30 | 5000 | mp4 |
facebook | 1280×720 | 30 | 4000 | mp4 |
4k | 3840×2160 | 30 | 50000 | mp4 |
1080p | 1920×1080 | 30 | 8000 | mp4 |
720p | 1280×720 | 30 | 5000 | mp4 |
mobile | 720×1280 | 30 | 2500 | mp4 |
web | 1280×720 | 30 | 3000 | webm |
Names matched case-insensitively.
stabilize
Two-pass vidstab when available:
vidstabdetect→ transforms.trfvidstabtransform=smoothing=N(**defaultsmoothing10)
Fallback: hqdn3d spatial/temporal denoise if analyse/transform throws.
addTransition
Fade-in / fade-out single clip
type: 'fade' without secondVideo:
direction | Filter |
|---|---|
out (default behaviour if you choose fade-out semantics) | fade=t=out:st=0:d=duration |
in / other | fade=t=in:st=0:d=duration |
Between two clips (xfade)
Requires secondVideo. Videos scaled to max(width)×max(height) then xfade at offset = duration(video1) - duration (transition straddles cut point).
type → xfade transition name mapping (defaults fade):
| Requested | Mapped |
|---|---|
fade, dissolve, blur | fade |
wipe + direction | wipeleft / wiperight / wipeup / wipedown |
slide + direction | slideleft, … |
zoom + in/out | zoomin / zoomout |
circle | circleopen |
pixelize | pixelize |
batch — recap
Prefer explicit for loops calling createVideo until batchProcessVideos assigns outputs automatically.
Related ApexPainter helpers (outside createVideo)
These exist on ApexPainter for lower-level control:
extractFrames(videoSource, options)— always interval mode (ms).extractAllFrames— same engine ascreateVideo.extractAllFrames.extractFrameAtTime,extractMultipleFrames— convenience wrappers.#createVideoFromFrames/#createVideoLoop— internal;createVideoalready exposescreateFromFrames/createLoop.
Operational checklist
- Install FFmpeg on
PATH(ffmpeg,ffprobe). - One primary operation key per
createVideocall — see router table. sourcerequired by TypeScript even when unused (merge, splitScreen, createFromFrames, batch).- Windows vs POSIX —
detectScenesshell pipeline may need Git Bash / WSL forgrep|awk|sedreliability. - Heavy ops —
reverse,extractAllFrames,stabilize— plan timeouts & disk space (.temp-framesgrows).