On this page
Everyframe · TypeScript SDK reference
video: frame filters
Video to Video filters backed by FFmpeg, plus ONNX model filters like upscale, denoise and colorize. Methods on a VideoStream, e.g. scale({ w: 1920, h: 1080 }).
@jtdigital/renderbox-sdk on npm →alphaextract
VideoStream.alphaextract(): VideoStreamExtract the alpha channel as a grayscale video
autoEnhance
VideoStream.autoEnhance(opts: AutoEnhanceOpts): VideoStreamAuto-enhance video quality using deep learning model
| Param | Type | Description |
|---|---|---|
| model required | string | |
| strength | number |
Range: [0, 1]
|
backgroundkey
VideoStream.backgroundkey(opts?: BackgroundkeyOpts): VideoStreamKey out a static background into transparency
| Param | Type | Description |
|---|---|---|
| threshold | number | |
| similarity | number | |
| blend | number |
bilateral
VideoStream.bilateral(opts?: BilateralOpts): VideoStreamEdge-preserving bilateral smoothing
| Param | Type | Description |
|---|---|---|
| sigmaS | number | |
| sigmaR | number | |
| planes | number |
blackdetect
VideoStream.blackdetect(opts?: BlackdetectOpts): VideoStreamDetect intervals of near-black video
| Param | Type | Description |
|---|---|---|
| d | number | |
| pix_th | number | |
| pic_th | number |
bm3d
VideoStream.bm3d(opts?: Bm3dOpts): VideoStreamBM3D denoising: high quality, slow
| Param | Type | Description |
|---|---|---|
| sigma | number | |
| block | number | |
| bstep | number | |
| group | number | |
| range | number | |
| mstep | number | |
| thmse | number | |
| hdthr | number | |
| estim | 'basic' | 'final' |
boxblur
VideoStream.boxblur(opts?: BoxblurOpts): VideoStreamFast box blur
| Param | Type | Description |
|---|---|---|
| luma_radius | string | |
| chroma_radius | string | |
| luma_power | number | |
| chroma_power | number |
cas
VideoStream.cas(opts?: CasOpts): VideoStreamContrast-adaptive sharpening
| Param | Type | Description |
|---|---|---|
| strength | number |
Range: [0, 1]
|
| planes | number |
chromakey
VideoStream.chromakey(opts: ChromakeyOpts): VideoStreamGreen-screen keying on a chroma color
| Param | Type | Description |
|---|---|---|
| color required | string | |
| similarity | number |
Range: [0, 1]
|
| blend | number |
Range: [0, 1]
|
colorbalance
VideoStream.colorbalance(opts?: ColorbalanceOpts): VideoStreamAdjust shadows/midtones/highlights color balance
| Param | Type | Description |
|---|---|---|
| rs | number | |
| gs | number | |
| bs | number | |
| rm | number | |
| gm | number | |
| bm | number | |
| rh | number | |
| gh | number | |
| bh | number |
colorchannelmixer
VideoStream.colorchannelmixer(opts?: ColorchannelmixerOpts): VideoStreamRemix RGBA channels with a matrix
| Param | Type | Description |
|---|---|---|
| rr | number | |
| rg | number | |
| rb | number | |
| ra | number | |
| gr | number | |
| gg | number | |
| gb | number | |
| ga | number | |
| br | number | |
| bg | number | |
| bb | number | |
| ba | number | |
| ar | number | |
| ag | number | |
| ab | number | |
| aa | number |
colorCorrect
VideoStream.colorCorrect(opts: ColorCorrectOpts): VideoStreamCorrect color cast and white balance using deep learning model
| Param | Type | Description |
|---|---|---|
| model required | string | |
| strength | number |
Range: [0, 1]
|
colorgrade
VideoStream.colorgrade(opts?: ColorgradeOpts): VideoStreamApply color grading LUT
| Param | Type | Description |
|---|---|---|
| lut | string |
colorhold
VideoStream.colorhold(opts: ColorholdOpts): VideoStreamDesaturate everything except a chosen color
| Param | Type | Description |
|---|---|---|
| color required | string | |
| similarity | number | |
| blend | number |
colorize
VideoStream.colorize(opts: ColorizeOpts): VideoStreamColorize black & white video using a deep learning model (DDColor)
| Param | Type | Description |
|---|---|---|
| model required | string | |
| saturation | number |
Range: greater than 0
|
| temporal_stability | number |
Range: [0, 1]
|
colorkey
VideoStream.colorkey(opts: ColorkeyOpts): VideoStreamKey out an RGB color into transparency
| Param | Type | Description |
|---|---|---|
| color required | string | |
| similarity | number |
Range: [0, 1]
|
| blend | number |
Range: [0, 1]
|
colorspace
VideoStream.colorspace(opts?: ColorspaceOpts): VideoStreamConvert between colorspaces (BT.601/709/2020)
| Param | Type | Description |
|---|---|---|
| all | 'bt470m' | 'bt470bg' | 'bt601-6-525' | 'bt601-6-625' | 'bt709' | 'smpte170m' | 'smpte240m' | 'bt2020' | |
| space | string | |
| trc | string | |
| primaries | string | |
| range | 'tv' | 'mpeg' | 'pc' | 'jpeg' | |
| format | string | |
| fast | number | |
| iall | string | |
| ispace | string | |
| itrc | string | |
| iprimaries | string | |
| irange | 'tv' | 'mpeg' | 'pc' | 'jpeg' |
colortemperature
VideoStream.colortemperature(opts: ColortemperatureOpts): VideoStreamWarm or cool the image by color temperature
| Param | Type | Description |
|---|---|---|
| temperature required | number |
crop
VideoStream.crop(opts?: CropOpts): VideoStreamCrop a rectangular region
| Param | Type | Description |
|---|---|---|
| w | number | string | Crop width (pixels or expression, e.g. 'iw/2').
Range: greater than 0
|
| h | number | string | Crop height (pixels or expression).
Range: greater than 0
|
| x | number | string | Left edge of the crop; centered when omitted. |
| y | number | string | Top edge of the crop; centered when omitted. |
curves
VideoStream.curves(opts: CurvesOpts): VideoStreamTone curves per channel, with photo-style presets
| Param | Type | Description |
|---|---|---|
| preset required | 'none' | 'color_negative' | 'cross_process' | 'darker' | 'increase_contrast' | 'lighter' | 'linear_contrast' | 'medium_contrast' | 'negative' | 'strong_contrast' | 'vintage' |
deband
VideoStream.deband(opts?: DebandOpts): VideoStreamRemove banding artifacts from gradients
| Param | Type | Description |
|---|---|---|
| 1thr | number | |
| range | number | |
| blur | boolean |
deblock
VideoStream.deblock(opts?: DeblockOpts): VideoStreamRemove blocking artifacts
| Param | Type | Description |
|---|---|---|
| strong | boolean |
deblur
VideoStream.deblur(opts: DeblurOpts): VideoStreamRemove motion/defocus blur using deep learning model
| Param | Type | Description |
|---|---|---|
| model required | string | |
| strength | number |
Range: [0, 1]
|
deflicker
VideoStream.deflicker(opts?: DeflickerOpts): VideoStreamRemove temporal luminance variations
| Param | Type | Description |
|---|---|---|
| size | number | |
| mode | string |
deinterlace
VideoStream.deinterlace(opts: DeinterlaceOpts): VideoStreamDeinterlace video using deep learning model
| Param | Type | Description |
|---|---|---|
| model required | string |
delogo
VideoStream.delogo(opts: DelogoOpts): VideoStreamRemove a logo by interpolating a screen region
| Param | Type | Description |
|---|---|---|
| x required | number | |
| y required | number | |
| w required | number | |
| h required | number |
denoise
VideoStream.denoise(opts: DenoiseOpts): VideoStreamDenoise video using deep learning model
| Param | Type | Description |
|---|---|---|
| model required | string | |
| strength | number |
Range: [0, 1]
|
denoiseHqdn3d
VideoStream.denoiseHqdn3d(opts?: DenoiseHqdn3dOpts): VideoStreamReduce video noise (FFmpeg hqdn3d)
| Param | Type | Description |
|---|---|---|
| strength | number |
deshake
VideoStream.deshake(opts?: DeshakeOpts): VideoStreamSingle-pass camera shake stabilization
| Param | Type | Description |
|---|---|---|
| rx | number | |
| ry | number |
dilation
VideoStream.dilation(opts?: DilationOpts): VideoStreamMorphological dilation (grow bright regions)
| Param | Type | Description |
|---|---|---|
| threshold0 | number | |
| threshold1 | number | |
| threshold2 | number | |
| threshold3 | number | |
| coordinates | number |
drawbox
VideoStream.drawbox(opts?: DrawboxOpts): VideoStreamDraw a rectangle outline or fill
| Param | Type | Description |
|---|---|---|
| x | number | string | |
| y | number | string | |
| w | number | string | |
| h | number | string | |
| color | string | |
| t | string | |
| enable | string |
drawgrid
VideoStream.drawgrid(opts?: DrawgridOpts): VideoStreamDraw a grid over the frame
| Param | Type | Description |
|---|---|---|
| x | string | |
| y | string | |
| w | string | |
| h | string | |
| color | string | |
| t | string | |
| replace | number |
drawtext
VideoStream.drawtext(opts?: DrawtextOpts): VideoStreamRender text onto the frame
| Param | Type | Description |
|---|---|---|
| text | string | Literal text to draw (supports FFmpeg expansion). |
| textfile | string | Read the text from a file instead. |
| fontfile | string | Path to a font file. |
| fontsize | number | string | Font size in pixels (or expression). |
| fontcolor | string | Text color (name or #rrggbb). |
| x | number | string | Horizontal position (pixels or expression, e.g. '(w-text_w)/2'). |
| y | number | string | Vertical position (pixels or expression). |
| align | 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right' | |
| box | number | |
| boxcolor | string | Background box color; drawn when set. |
| boxborderw | number | |
| borderw | number | Text border width in pixels. |
| shadowcolor | string | Drop-shadow color. |
| shadowx | number | Shadow x offset. |
| shadowy | number | Shadow y offset. |
| alpha | number | string | Text opacity. |
| font | string | Font family name (fontconfig lookup). |
| line_spacing | number | Extra spacing between lines in pixels. |
| enable | string | Timeline expression controlling when the text is visible. |
| expansion | 'none' | 'normal' | 'strftime' | How the text string is expanded. |
edgedetect
VideoStream.edgedetect(opts?: EdgedetectOpts): VideoStreamEdge detection (Canny) visualization
| Param | Type | Description |
|---|---|---|
| low | number | |
| high | number | |
| mode | 'wires' | 'colormix' | 'canny' |
eq
VideoStream.eq(opts?: EqOpts): VideoStreamBrightness / contrast / saturation / gamma adjustment
| Param | Type | Description |
|---|---|---|
| brightness | number | Additive brightness.
Range: [-1, 1]
|
| contrast | number | Contrast multiplier.
Range: [-1000, 1000]
|
| saturation | number | Saturation multiplier.
Range: [0, 3]
|
| gamma | number | Gamma correction.
Range: [0.1, 10]
|
erosion
VideoStream.erosion(opts?: ErosionOpts): VideoStreamMorphological erosion (shrink bright regions)
| Param | Type | Description |
|---|---|---|
| threshold0 | number | |
| threshold1 | number | |
| threshold2 | number | |
| threshold3 | number | |
| coordinates | number |
fade
VideoStream.fade(opts: FadeOpts): VideoStreamFade the video in or out
| Param | Type | Description |
|---|---|---|
| type required | 'in' | 'out' | Fade direction. |
| st | number | Start time in seconds.
Range: at least 0
|
| d | number | Fade duration in seconds.
Range: greater than 0
|
| color | string | Color faded to/from (default black). |
| alpha | number | Fade only the alpha channel. |
fillborders
VideoStream.fillborders(opts?: FillbordersOpts): VideoStreamFill frame borders with a color or mirror
| Param | Type | Description |
|---|---|---|
| left | number | |
| right | number | |
| top | number | |
| bottom | number | |
| mode | 'smear' | 'mirror' | 'fixed' | 'reflect' | 'wrap' | 'fade' | 'margins' | |
| color | string |
format
VideoStream.format(opts: FormatOpts): VideoStreamConvert pixel format
| Param | Type | Description |
|---|---|---|
| pix_fmts required | string |
fps
VideoStream.fps(opts: FpsOpts): VideoStreamChange video frame rate
| Param | Type | Description |
|---|---|---|
| fps required | number |
Range: greater than 0
|
frameInterpolate
VideoStream.frameInterpolate(opts: FrameInterpolateOpts): VideoStreamInterpolate frames using optical flow model
| Param | Type | Description |
|---|---|---|
| model required | string | |
| factor | number |
Range: greater than 0
|
framestep
VideoStream.framestep(opts: FramestepOpts): VideoStreamKeep every Nth frame
| Param | Type | Description |
|---|---|---|
| step required | number |
Range: at least 1
|
freezedetect
VideoStream.freezedetect(opts?: FreezedetectOpts): VideoStreamDetect frozen (static) video intervals
| Param | Type | Description |
|---|---|---|
| noise | number | |
| duration | number |
gblur
VideoStream.gblur(opts: GblurOpts): VideoStreamGaussian blur
| Param | Type | Description |
|---|---|---|
| sigma required | number | Blur strength (standard deviation).
Range: greater than 0
|
geq
VideoStream.geq(opts?: GeqOpts): VideoStreamPer-pixel generic equation filter
| Param | Type | Description |
|---|---|---|
| r | string | |
| g | string | |
| b | string | |
| a | string | |
| lum_expr | string |
hflip
VideoStream.hflip(): VideoStreamFlip horizontally
histogram
VideoStream.histogram(opts?: HistogramOpts): VideoStreamRender the color histogram as video
| Param | Type | Description |
|---|---|---|
| level_height | number | |
| display_mode | 'stack' | 'parade' | 'overlay' | |
| levels_mode | 'logarithmic' | 'linear' |
hqdn3d
VideoStream.hqdn3d(opts?: Hqdn3dOpts): VideoStreamHigh-quality 3D denoiser (spatial + temporal)
| Param | Type | Description |
|---|---|---|
| luma_spatial | number | |
| chroma_spatial | number | |
| luma_tmp | number | |
| chroma_tmp | number |
hue
VideoStream.hue(opts?: HueOpts): VideoStreamRotate hue and adjust saturation
| Param | Type | Description |
|---|---|---|
| h | number | string | |
| s | number | string | |
| b | number | string |
hwdownload
VideoStream.hwdownload(): VideoStreamDownload frames from GPU memory to system memory
hwupload
VideoStream.hwupload(): VideoStreamUpload frames from system memory to GPU memory
hwuploadCuda
VideoStream.hwuploadCuda(): VideoStreamUpload frames to CUDA GPU memory
lagfun
VideoStream.lagfun(opts?: LagfunOpts): VideoStreamSlowly decay darker pixels: light-trail effect
| Param | Type | Description |
|---|---|---|
| decay | number | |
| planes | number |
lenscorrection
VideoStream.lenscorrection(opts?: LenscorrectionOpts): VideoStreamCorrect radial lens distortion
| Param | Type | Description |
|---|---|---|
| cx | number | |
| cy | number | |
| k1 | number | |
| k2 | number | |
| i | 'nearest' | 'bilinear' |
loop
VideoStream.loop(opts: LoopOpts): VideoStreamLoop a range of frames
| Param | Type | Description |
|---|---|---|
| loop required | number | |
| size | number | |
| start | number |
lut1d
VideoStream.lut1d(opts: Lut1dOpts): VideoStreamApply a 1D color lookup table file
| Param | Type | Description |
|---|---|---|
| file required | string |
lut3d
VideoStream.lut3d(opts: Lut3dOpts): VideoStreamApply a 3D LUT file (.cube) for color grading
| Param | Type | Description |
|---|---|---|
| file required | string |
minterpolate
VideoStream.minterpolate(opts?: MinterpolateOpts): VideoStreamMotion-interpolated frame rate conversion
| Param | Type | Description |
|---|---|---|
| fps | number | |
| mi_mode | 'dup' | 'blend' | 'mci' | |
| mc_mode | 'obmc' | 'aobmc' | |
| me_mode | 'bidir' | 'bilat' | |
| me | 'esa' | 'tss' | 'tdls' | 'ntss' | 'fss' | 'ds' | 'hexbs' | 'epzs' | 'umh' | |
| mb_size | number | |
| search_param | number | |
| scd | 'none' | 'fdiff' | |
| scd_threshold | number |
motionRedact
VideoStream.motionRedact(opts?: MotionRedactOpts): VideoStreamRedact everything that moves against the static background (motion-completeness privacy mask)
| Param | Type | Description |
|---|---|---|
| mode | 'black' | 'blur' | 'pixelate' | |
| radius | number |
Range: greater than 0
|
| sensitivity | number |
Range: [1, 255]
|
| decay_secs | number |
Range: greater than 0
|
| dilate_px | number |
Range: at least 0
|
| warmup_secs | number |
Range: at least 0
|
| learning_rate | number |
Range: [0, 1]
|
| fps | number |
Range: greater than 0
|
mpdecimate
VideoStream.mpdecimate(opts?: MpdecimateOpts): VideoStreamDrop near-duplicate frames
| Param | Type | Description |
|---|---|---|
| max | number | |
| lo | number | |
| hi | number | |
| frac | number |
negate
VideoStream.negate(opts?: NegateOpts): VideoStreamInvert colors
| Param | Type | Description |
|---|---|---|
| negate | number | |
| alpha | number |
nlmeans
VideoStream.nlmeans(opts?: NlmeansOpts): VideoStreamNon-local means denoising
| Param | Type | Description |
|---|---|---|
| s | number |
noise
VideoStream.noise(opts?: NoiseOpts): VideoStreamAdd film-grain style noise
| Param | Type | Description |
|---|---|---|
| alls | number |
Range: [0, 100]
|
| allf | string | |
| seed | number |
pad
VideoStream.pad(opts?: PadOpts): VideoStreamPad the frame to a larger canvas
| Param | Type | Description |
|---|---|---|
| w | number | string |
Range: greater than 0
|
| h | number | string |
Range: greater than 0
|
| x | number | string | |
| y | number | string | |
| align | 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right' | |
| color | string |
palettegen
VideoStream.palettegen(opts?: PalettegenOpts): VideoStreamGenerate an optimized palette (GIF pipeline)
| Param | Type | Description |
|---|---|---|
| max_colors | number | |
| reserve_transparent | number | |
| stats_mode | 'full' | 'diff' | 'single' |
paletteuse
VideoStream.paletteuse(opts?: PaletteuseOpts): VideoStreamMap video to a palette (GIF pipeline)
| Param | Type | Description |
|---|---|---|
| dither | 'bayer' | 'heckbert' | 'floyd_steinberg' | 'sierra2' | 'sierra2_4a' | 'sierra3' | 'burkes' | 'atkinson' | 'none' | |
| bayer_scale | number | |
| diff_mode | 'rectangle' | 'none' | |
| new | number |
perspective
VideoStream.perspective(opts?: PerspectiveOpts): VideoStreamPerspective-correct by remapping corner points
| Param | Type | Description |
|---|---|---|
| x0 | string | |
| y0 | string | |
| x1 | string | |
| y1 | string | |
| x2 | string | |
| y2 | string | |
| x3 | string | |
| y3 | string | |
| interpolation | 'linear' | 'cubic' | |
| sense | 'source' | 'destination' |
photosensitivity
VideoStream.photosensitivity(opts?: PhotosensitivityOpts): VideoStreamReduce flashing that can trigger photosensitivity
| Param | Type | Description |
|---|---|---|
| threshold | number | |
| frames | number | |
| skip | number |
pseudocolor
VideoStream.pseudocolor(opts?: PseudocolorOpts): VideoStreamMap grayscale values through a color ramp
| Param | Type | Description |
|---|---|---|
| preset | string | |
| c0 | string | |
| c1 | string | |
| c2 | string | |
| c3 | string | |
| index | number | |
| opacity | number |
psnr
VideoStream.psnr(opts?: PsnrOpts): VideoStreamMeasure PSNR against a reference stream
| Param | Type | Description |
|---|---|---|
| stats_file | string |
redactTracks
VideoStream.redactTracks(opts: RedactTracksOpts): VideoStreamRedact keyframe-tracked regions (reviewed tracks, no detection)
| Param | Type | Description |
|---|---|---|
| tracks required | string |
resize
VideoStream.resize(opts: ResizeOpts): VideoStreamResize video
| Param | Type | Description |
|---|---|---|
| w required | number | |
| h required | number |
reverse
VideoStream.reverse(): VideoStreamReverse the video (buffers all frames)
rgbashift
VideoStream.rgbashift(opts?: RgbashiftOpts): VideoStreamShift RGBA channels independently: glitch effect
| Param | Type | Description |
|---|---|---|
| rh | number | |
| rv | number | |
| gh | number | |
| gv | number | |
| bh | number | |
| bv | number | |
| ah | number | |
| av | number | |
| edge | 'smear' | 'wrap' | |
| enable | string |
rotate
VideoStream.rotate(opts?: RotateOpts): VideoStreamRotate by an arbitrary angle
| Param | Type | Description |
|---|---|---|
| angle | number | string | |
| a | number | string | |
| fillcolor | string | |
| bilinear | number |
scale
VideoStream.scale(opts: ScaleOpts): VideoStreamScale video dimensions
| Param | Type | Description |
|---|---|---|
| w required | number | Target width in pixels. |
| h required | number | Target height in pixels. |
| force_original_aspect_ratio | string | 'decrease' or 'increase' to fit/fill while keeping aspect. |
| flags | string | Scaler algorithm, e.g. 'lanczos', 'bicubic'. |
scaleCuda
VideoStream.scaleCuda(opts?: ScaleCudaOpts): VideoStreamGPU-accelerated scaling on CUDA frames
| Param | Type | Description |
|---|---|---|
| w | string | |
| h | string | |
| interp_algo | 'nearest' | 'bilinear' | 'bicubic' | 'lanczos' |
select
VideoStream.select(opts: SelectOpts): VideoStreamKeep frames matching an expression
| Param | Type | Description |
|---|---|---|
| expr required | string |
selectivecolor
VideoStream.selectivecolor(opts?: SelectivecolorOpts): VideoStreamCMYK-style adjustments within color ranges
| Param | Type | Description |
|---|---|---|
| correction_method | 'absolute' | 'relative' | |
| reds | string | |
| yellows | string | |
| greens | string | |
| cyans | string | |
| blues | string | |
| magentas | string | |
| whites | string | |
| neutrals | string | |
| blacks | string |
sendcmd
VideoStream.sendcmd(opts?: SendcmdOpts): VideoStreamSend timed commands to other filters
| Param | Type | Description |
|---|---|---|
| filename | string | |
| commands | string |
setdar
VideoStream.setdar(opts: SetdarOpts): VideoStreamSet display aspect ratio metadata
| Param | Type | Description |
|---|---|---|
| dar required | string |
setpts
VideoStream.setpts(opts: SetptsOpts): VideoStreamSet presentation timestamps
| Param | Type | Description |
|---|---|---|
| expr required | string |
setsar
VideoStream.setsar(opts: SetsarOpts): VideoStreamSet sample aspect ratio
| Param | Type | Description |
|---|---|---|
| sar required | string |
ssim
VideoStream.ssim(opts?: SsimOpts): VideoStreamMeasure SSIM against a reference stream
| Param | Type | Description |
|---|---|---|
| stats_file | string |
subtitles
VideoStream.subtitles(opts: SubtitlesOpts): VideoStreamBurn a subtitle file (SRT/ASS) into the frames
| Param | Type | Description |
|---|---|---|
| filename required | string | |
| fontsdir | string | |
| force_style | string | |
| charenc | string | |
| stream_index | number |
tblend
VideoStream.tblend(opts?: TblendOpts): VideoStreamBlend consecutive frames: motion-blur style effects
| Param | Type | Description |
|---|---|---|
| all_mode | string | |
| all_opacity | number | |
| all_expr | string |
thumbnail
VideoStream.thumbnail(opts?: ThumbnailOpts): VideoStreamPick the most representative frame of every batch
| Param | Type | Description |
|---|---|---|
| n | number |
tile
VideoStream.tile(opts?: TileOpts): VideoStreamTile several frames into one mosaic frame
| Param | Type | Description |
|---|---|---|
| layout | string | |
| nb_frames | number | |
| padding | number | |
| margin | number | |
| color | string |
tmix
VideoStream.tmix(opts?: TmixOpts): VideoStreamAverage N consecutive frames
| Param | Type | Description |
|---|---|---|
| frames | number | |
| weights | string | |
| scale | number | |
| planes | number |
tpad
VideoStream.tpad(opts?: TpadOpts): VideoStreamPad the stream in time with cloned or blank frames
| Param | Type | Description |
|---|---|---|
| start | number | |
| stop | number | |
| start_mode | 'add' | 'clone' | |
| stop_mode | 'add' | 'clone' | |
| start_duration | number | |
| stop_duration | number | |
| color | string |
transpose
VideoStream.transpose(opts: TransposeOpts): VideoStreamRotate by 90° steps and/or flip
| Param | Type | Description |
|---|---|---|
| dir required | number |
Range: [0, 3]
|
trim
VideoStream.trim(opts?: TrimOpts): VideoStreamKeep only the frames between start and end
| Param | Type | Description |
|---|---|---|
| start | number | Keep from this timestamp (seconds).
Range: at least 0
|
| end | number | Keep until this timestamp (seconds).
Range: greater than 0
|
unsharp
VideoStream.unsharp(opts?: UnsharpOpts): VideoStreamSharpen (or soften) with an unsharp mask
| Param | Type | Description |
|---|---|---|
| luma_msize_x | number | |
| luma_msize_y | number | |
| luma_amount | number |
upscale
VideoStream.upscale(opts: UpscaleOpts): VideoStreamUpscale video using super-resolution model
| Param | Type | Description |
|---|---|---|
| model required | string | Super-resolution model id (e.g. 'realesrgan-x4'). |
| scale | number | Upscale factor.
Range: greater than 0
|
| tileSize | number | Tile size for VRAM-bounded inference.
Range: greater than 0
|
v360
VideoStream.v360(opts?: V360Opts): VideoStreamConvert between 360° video projections
| Param | Type | Description |
|---|---|---|
| input | string | |
| output | string | |
| interp | string | |
| w | number | |
| h | number | |
| yaw | number | |
| pitch | number | |
| roll | number | |
| d_fov | number | |
| id_fov | number | |
| h_flip | boolean | |
| v_flip | boolean | |
| in_stereo | string | |
| out_stereo | string |
vectorscope
VideoStream.vectorscope(opts?: VectorscopeOpts): VideoStreamRender a chroma vectorscope as video
| Param | Type | Description |
|---|---|---|
| mode | 'gray' | 'tint' | 'color' | 'color2' | 'color3' | 'color4' | 'color5' | |
| intensity | number | |
| envelope | number |
vflip
VideoStream.vflip(): VideoStreamFlip vertically
vidstab
VideoStream.vidstab(opts?: VidstabOpts): VideoStreamVideo stabilization
| Param | Type | Description |
|---|---|---|
| shakiness | number | |
| smoothing | number |
vidstabdetect
VideoStream.vidstabdetect(opts?: VidstabdetectOpts): VideoStreamStabilization pass 1: analyze camera motion
| Param | Type | Description |
|---|---|---|
| shakiness | number | |
| accuracy | number | |
| stepsize | number | |
| mincontrast | number | |
| result | string |
vidstabtransform
VideoStream.vidstabtransform(opts?: VidstabtransformOpts): VideoStreamStabilization pass 2: apply smoothed transforms
| Param | Type | Description |
|---|---|---|
| input | string | |
| smoothing | number | |
| optalgo | 'opt' | 'gauss' | 'avg' | |
| maxshift | number | |
| maxangle | number | |
| crop | 'keep' | 'black' | |
| zoom | number | |
| optzoom | number | |
| interpol | 'no' | 'linear' | 'bilinear' | 'bicubic' |
vignette
VideoStream.vignette(opts?: VignetteOpts): VideoStreamDarken the frame edges
| Param | Type | Description |
|---|---|---|
| angle | number |
Range: [0, 1.5707963267948966]
|
waveform
VideoStream.waveform(opts?: WaveformOpts): VideoStreamRender a luma waveform monitor as video
| Param | Type | Description |
|---|---|---|
| mode | 'row' | 'column' | 'color' | 'color2' | 'acolor' | |
| intensity | number | |
| mirror | number |
yadif
VideoStream.yadif(): VideoStreamDeinterlace (yet another deinterlacing filter)
zoompan
VideoStream.zoompan(opts: ZoompanOpts): VideoStreamKen Burns zoom and pan over frames
| Param | Type | Description |
|---|---|---|
| z | string | Zoom expression per output frame (e.g. 'zoom+0.001'). |
| x | string | Pan x expression. |
| y | string | Pan y expression. |
| d required | number | Output frames rendered per input frame. |
| fps | number | Output frame rate. |
| s | string | Output size, e.g. '1920x1080'. |