infery
← All models

Workflow Utilities Scale Video

workflow-utilities-scale-video

Video generationby infery

FFMPEG Utilities to Scale Videos

Example

Details

Accepts
video

Pricing

Price
0.125 cr / second

Prices in credits (1 credit = $0.01).

Data schema

Input

FieldTypeDescription
crfintegerConstant Rate Factor for quality (0-51). Lower values mean better quality and larger files. 18 is visually lossless for most content.
modestringenum: stretch, pad, cropScaling mode. 'stretch' scales the video to the exact target dimensions (may distort aspect ratio). 'pad' scales to fit within the target dimensions while preserving aspect ratio, then pads with the chosen color to fill the remaining space (letterbox/pillarbox). 'crop' scales to cover the target dim…
codecstringenum: libx264, libx265Video codec to use for encoding. libx264 (H.264) is widely compatible, libx265 (H.265/HEVC) offers better compression.
widthTarget width in pixels. If only width is provided, height is auto-calculated to preserve aspect ratio. At least one of width or height must be provided.
heightTarget height in pixels. If only height is provided, width is auto-calculated to preserve aspect ratio. At least one of width or height must be provided.
presetstringenum: ultrafast, fast, medium, slowEncoding speed preset. Slower presets give better compression but take longer.
pad_colorstringenum: black, white, red, green, blue, grayPadding color when mode is 'pad'. Ignored for other modes.
video_urlrequiredstringURL of the video file to scale/resize. Height and Width of the video must be even numbers for compatibility with video codecs.

Output

FieldTypeDescription
videoThe scaled/resized video
scaled_widthintegerWidth of the output video in pixels
scaled_heightintegerHeight of the output video in pixels
original_widthintegerWidth of the original video in pixels
original_heightintegerHeight of the original video in pixels