Everyframe · TypeScript SDK reference

Recipes

Hand-written helpers for common jobs, built from the same generated ops. Each key-to-key recipe returns a ready-to-submit Graph.

@jtdigital/renderbox-sdk on npm →

faceRedact

faceRedact(input: string, output: string, opts?: FaceRedactOpts): Graph

Detect faces, track them, and redact: the GDPR pipeline in one call. Equivalent to open, detect, track, redact, write. Inputs/outputs are S3 keys.

Param Type Description
model string Face detection model (default 'retinaface_mv2', permissive: Apache-2.0 code + MIT weights).
threshold number Detection confidence threshold (default 0.5).
tracking 'bytetrack' | 'sort' | 'deepsort' | false Tracker for stable per-face identity; false redacts raw detections.
redactMode 'blur' | 'pixelate' | 'black' Redaction style (default 'black').
redactRadius number Blur radius / pixel block size.
output SinkAvOpts Encoder options for the output file.

redactPasses

redactPasses(video: VideoStream, passes: readonly RedactPass[]): VideoStream

Burn any number of detector passes onto one video, sequenced as data — one { detect, track?, redact? } per pass. Every pass detects on the ORIGINAL frames (an earlier burn must not hide what a later detector needs to find) while the burn accumulates. Defaults: ByteTrack tracking, { mode: 'black' }.

Param Type Description
detect required DetectOpts Detector options for this pass (model, threshold, stride, batchSize, …).
track TrackOpts | 'bytetrack' | 'sort' | 'deepsort' | false Tracker — an algorithm name or full TrackOpts (e.g. persistFrames); false redacts raw per-frame detections (default 'bytetrack').
redact RedactOpts Treatment for this pass — variant-typed: blur requires radius, black forbids it (default { mode: 'black' }).

depthBlurPipeline

depthBlurPipeline(input: string, output: string, opts?: DepthBlurPipelineOpts): Graph

Estimate monocular depth and apply distance-aware background blur: portrait mode for video.

Param Type Description
depthModel string Depth estimation model.
maxBlur number Blur strength at the far plane.
nearPlane number Depth kept fully sharp.
farPlane number Depth fully blurred.
output SinkAvOpts Encoder options.

makeSlideshow

makeSlideshow(output: string, opts: MakeSlideshowOpts): Graph

Build a slideshow from stills: per-slide Ken Burns motion (12 presets, from gentleZoomIn to parallax), crossfade transitions, and an optional music bed with fade in/out.

Param Type Description
slides required SlideConfig[] Slides: { path, duration, kenBurns? } (paths are S3 keys).
resolution required [number, number] Output resolution, e.g. [1920, 1080].
fps number Output frame rate.
transition SlideshowTransition Transition type + duration between slides.
music SlideshowMusicOpts Music bed: { path, volume?, fadeIn?, fadeOut? }.
output SinkAvOpts Encoder options.

letterbox

letterbox(input: VideoStream, w: number, h: number, opts?): VideoStream

Fit a stream into a target frame, preserving aspect with padding. A stream transform, so it composes inside a larger graph.

snip

snip(input: VideoStream, start: number, end: number): VideoStream

Frame-accurate clip extraction with timestamps reset to zero.