On this page
Everyframe · TypeScript SDK reference
combine: multi-stream ops
Ops that take two or more streams: apply analysis back onto video (redact, annotate), or composite (overlay, xfade, concat, stacks). Methods on the primary stream: video.redact(detections, opts).
@jtdigital/renderbox-sdk on npm →acrossfade
AudioStream.acrossfade(b: AudioStream, opts?: AcrossfadeOpts): AudioStreamCross-fade between two audio streams
| Param | Type | Description |
|---|---|---|
| d | number |
amix
AudioStream.amix(rest: AudioStream[], opts?: AmixOpts): AudioStreamMix multiple audio streams
| Param | Type | Description |
|---|---|---|
| normalize | boolean | |
| duration | 'longest' | 'shortest' | 'first' |
anchorGraphic
VideoStream.anchorGraphic(b: PoseStream, opts: AnchorGraphicOpts): VideoStreamAnchor graphic overlay to pose keypoint
| Param | Type | Description |
|---|---|---|
| keypoint required | string | |
| offset_x | number | |
| offset_y | number |
annotate
VideoStream.annotate(b: DetectionStream, opts?: AnnotateOpts): VideoStreamDraw detection annotations on video
| Param | Type | Description |
|---|---|---|
| style | 'bbox' | 'label' | 'bbox+label' | 'mask' | What to draw for each detection. 'mask' forbids thickness/fontsize/fontcolor (a TypeScript error if supplied). |
| thickness | number | Outline thickness in pixels. |
| show_confidence | boolean | Append the confidence score to labels. |
| fontsize | number | Label font size. |
| fontcolor | string | Label text color. |
| color | string | Box/label color (single color for all classes). |
| class_colors | Record<string, ParamValue> | Per-class color map, e.g. { person: '#22c55e' }. |
blend
VideoStream.blend(b: VideoStream, opts?: BlendOpts): VideoStreamBlend two video streams with a blend mode per component
| Param | Type | Description |
|---|---|---|
| all_mode | string | |
| all_opacity | number | |
| all_expr | string |
classifyDetections
VideoStream.classifyDetections(b: DetectionStream, opts: ClassifyDetectionsOpts): DetectionStreamClassify detection crops with a secondary model
| Param | Type | Description |
|---|---|---|
| model required | string | |
| crop_region | number |
Range: [0, 1]
|
| padding | number |
Range: at least 0
|
| attribute | string | |
| threshold | number |
Range: [0, 1]
|
| labels | string | |
| crop_anchor | string | |
| crop_height_ratio | number |
Range: [0, 1]
|
| norm | string |
concat
VideoStream.concat(rest: VideoStream[], opts?: ConcatOpts): VideoStreamConcatenate videos
| Param | Type | Description |
|---|---|---|
| a | number | Number of audio streams per segment. |
| v | number | Number of video streams per segment. |
containsDetections
DetectionStream.containsDetections(b: DetectionStream, opts?: ContainsDetectionsOpts): DetectionStreamSpatial containment test between detection sets
| Param | Type | Description |
|---|---|---|
| min_containment | number |
Range: [0, 1]
|
| region | string |
densityOverlay
VideoStream.densityOverlay(b: DensityStream, opts?: DensityOverlayOpts): VideoStreamOverlay density heatmap on video
| Param | Type | Description |
|---|---|---|
| colormap | string | |
| alpha | number |
Range: [0, 1]
|
depthBlur
VideoStream.depthBlur(b: DepthStream, opts?: DepthBlurOpts): VideoStreamDepth-based blur effect
| Param | Type | Description |
|---|---|---|
| max_blur | number | Blur strength at the far plane.
Range: at least 0
|
| near_plane | number | Depth treated as fully sharp. |
| far_plane | number | Depth treated as fully blurred. |
depthFog
VideoStream.depthFog(b: DepthStream, opts?: DepthFogOpts): VideoStreamDepth-based fog effect
| Param | Type | Description |
|---|---|---|
| density | number |
Range: [0, 1]
|
| color | string | |
| near_plane | number | |
| far_plane | number |
drawSkeleton
VideoStream.drawSkeleton(b: PoseStream, opts?: DrawSkeletonOpts): VideoStreamDraw pose skeleton on video
| Param | Type | Description |
|---|---|---|
| line_width | number |
Range: greater than 0
|
| keypoint_radius | number |
Range: greater than 0
|
| color | string | |
| min_confidence | number |
Range: [0, 1]
|
| show_labels | boolean |
dynamicCrop
VideoStream.dynamicCrop(b: DetectionStream, opts: DynamicCropOpts): VideoStreamDynamically crop video tracking detected regions
| Param | Type | Description |
|---|---|---|
| target_aspect_w required | number | Output aspect ratio width component (e.g. 9).
Range: greater than 0
|
| target_aspect_h required | number | Output aspect ratio height component (e.g. 16).
Range: greater than 0
|
| smoothing | number | Camera-path smoothing; higher is steadier.
Range: [0, 1]
|
| padding | number | Extra margin around subjects, as a fraction of the crop.
Range: at least 0
|
| subject | string | Class name to follow when multiple detections are present. |
estimatePoseDetections
VideoStream.estimatePoseDetections(b: DetectionStream, opts: EstimatePoseDetectionsOpts): PoseStreamTop-down pose keypoints per detected person (RTMPose)
| Param | Type | Description |
|---|---|---|
| model required | string | |
| threshold | number |
Range: at least 0
|
| padding | number |
Range: at least 0
|
hstack
VideoStream.hstack(rest: VideoStream[], opts?: HstackOpts): VideoStreamStack videos horizontally
| Param | Type | Description |
|---|---|---|
| shortest | boolean |
intersectionDetections
DetectionStream.intersectionDetections(b: DetectionStream, opts?: IntersectionDetectionsOpts): DetectionStreamIntersection of detection sets
| Param | Type | Description |
|---|---|---|
| iou_threshold | number |
Range: [0, 1]
|
intersectionSegmentations
SegmentationStream.intersectionSegmentations(b: SegmentationStream): SegmentationStreamIntersection of segmentation masks
maskBlur
VideoStream.maskBlur(b: SegmentationStream, opts?: MaskBlurOpts): VideoStreamBlur regions by segmentation mask
| Param | Type | Description |
|---|---|---|
| radius | number |
Range: at least 0
|
| sigma | number |
Range: at least 0
|
| invert | boolean |
maskColorGrade
VideoStream.maskColorGrade(b: SegmentationStream, opts?: MaskColorGradeOpts): VideoStreamColor grade by segmentation mask
| Param | Type | Description |
|---|---|---|
| saturation | number | |
| brightness | number | |
| contrast | number | |
| hue | number | |
| invert | boolean |
maskComposite
VideoStream.maskComposite(b: SegmentationStream, opts?: MaskCompositeOpts): VideoStreamComposite video with segmentation mask
| Param | Type | Description |
|---|---|---|
| mode | 'replace' | 'overlay' | 'multiply' | |
| background | string | |
| opacity | number |
Range: [0, 1]
|
maskedmerge
VideoStream.maskedmerge(b: VideoStream): VideoStreamMerge two video streams through an alpha/mask stream
overlay
VideoStream.overlay(b: VideoStream, opts?: OverlayOpts): VideoStreamOverlay video on video
| Param | Type | Description |
|---|---|---|
| x | number | string | Horizontal position of the overlaid stream (pixels or FFmpeg expression). |
| y | number | string | Vertical position (pixels or FFmpeg expression). |
| align | 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right' | |
| alpha | number | Overlay opacity.
Range: [0, 1]
|
overlayTranslation
VideoStream.overlayTranslation(b: TextStream, opts: OverlayTranslationOpts): VideoStreamOverlay translated text on video
| Param | Type | Description |
|---|---|---|
| target_language required | string | |
| font_family | string | |
| font_size | number |
Range: greater than 0
|
| background_color | string |
parallax
VideoStream.parallax(b: DepthStream, opts?: ParallaxOpts): VideoStreamParallax depth effect
| Param | Type | Description |
|---|---|---|
| amplitude | number |
Range: at least 0
|
| direction | 'horizontal' | 'vertical' | 'zoom' | |
| duration | number |
recognizeTextIn
VideoStream.recognizeTextIn(b: DetectionStream, opts: RecognizeTextInOpts): TextStreamOCR text recognition within detection bounding boxes
| Param | Type | Description |
|---|---|---|
| model required | string | |
| threshold | number |
Range: [0, 1]
|
| padding | number |
Range: at least 0
|
redact
VideoStream.redact(b: DetectionStream, opts?: RedactOpts): VideoStreamRedact detected regions
| Param | Type | Description |
|---|---|---|
| mode | 'blur' | 'pixelate' | 'black' | Redaction style applied inside each detection region. Variant-typed: 'blur' requires radius, 'black' forbids it — the wrong combination is a TypeScript error. |
| radius | number | Blur radius / pixelation block size in pixels. Required for 'blur', forbidden for 'black'.
Range: at least 0
|
redactText
VideoStream.redactText(b: TextStream, opts?: RedactTextOpts): VideoStreamRedact recognized text regions
| Param | Type | Description |
|---|---|---|
| mode | 'blur' | 'pixelate' | 'black' | |
| radius | number |
Range: at least 0
|
| padding | number |
Range: at least 0
|
renderHeatmap
VideoStream.renderHeatmap(b: DensityStream, opts?: RenderHeatmapOpts): VideoStreamRender density as colored heatmap
| Param | Type | Description |
|---|---|---|
| colormap | string | |
| alpha | number |
Range: [0, 1]
|
| radius | number |
Range: greater than 0
|
| blur | number |
scale2ref
VideoStream.scale2ref(b: VideoStream): VideoStreamScale a video to match the dimensions of a reference stream
sceneColorGrade
VideoStream.sceneColorGrade(b: SceneStream, opts?: SceneColorGradeOpts): VideoStreamApply per-scene color grading
| Param | Type | Description |
|---|---|---|
| preset | string | |
| intensity | number |
Range: [0, 1]
|
| transition_frames | number |
Range: at least 0
|
sidechaincompress
AudioStream.sidechaincompress(b: AudioStream, opts?: SidechaincompressOpts): AudioStreamCompress main audio when sidechain signal exceeds threshold
| Param | Type | Description |
|---|---|---|
| threshold | number | |
| ratio | number | |
| attack | number | |
| release | number | |
| level_sc | number |
slideshow
VideoStream.slideshow(rest: VideoStream[], opts?: SlideshowOpts): VideoStreamCreate slideshow from images
| Param | Type | Description |
|---|---|---|
| transition | string | |
| duration | number | |
| segment_duration | number |
union
DetectionStream.union(b: DetectionStream): DetectionStreamUnion of detection sets
unionSegmentations
SegmentationStream.unionSegmentations(b: SegmentationStream): SegmentationStreamUnion of segmentation masks
vstack
VideoStream.vstack(rest: VideoStream[], opts?: VstackOpts): VideoStreamStack videos vertically
| Param | Type | Description |
|---|---|---|
| shortest | boolean |
weightedDetections
DetectionStream.weightedDetections(b: DetectionStream, opts?: WeightedDetectionsOpts): DetectionStreamWeighted union of detection sets
| Param | Type | Description |
|---|---|---|
| weight_a | number |
Range: at least 0
|
| weight_b | number |
Range: at least 0
|
xfade
VideoStream.xfade(b: VideoStream, opts?: XfadeOpts): VideoStreamCross-fade transition between two videos
| Param | Type | Description |
|---|---|---|
| transition | string | Transition name (e.g. 'fade', 'dissolve', 'wipeleft'). |
| duration | number | Transition length in seconds. |
| offset | number | Time into the first stream when the transition starts. |
xstack
VideoStream.xstack(rest: VideoStream[], opts?: XstackOpts): VideoStreamStack videos in custom grid layout
| Param | Type | Description |
|---|---|---|
| layout | string | |
| fill | string |