← 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
| Field | Type | Description |
|---|---|---|
| crf | integer | Constant Rate Factor for quality (0-51). Lower values mean better quality and larger files. 18 is visually lossless for most content. |
| mode | stringenum: stretch, pad, crop | Scaling 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… |
| codec | stringenum: libx264, libx265 | Video codec to use for encoding. libx264 (H.264) is widely compatible, libx265 (H.265/HEVC) offers better compression. |
| width | — | Target 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. |
| height | — | Target 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. |
| preset | stringenum: ultrafast, fast, medium, slow | Encoding speed preset. Slower presets give better compression but take longer. |
| pad_color | stringenum: black, white, red, green, blue, gray | Padding color when mode is 'pad'. Ignored for other modes. |
| video_urlrequired | string | URL of the video file to scale/resize. Height and Width of the video must be even numbers for compatibility with video codecs. |
Output
| Field | Type | Description |
|---|---|---|
| video | — | The scaled/resized video |
| scaled_width | integer | Width of the output video in pixels |
| scaled_height | integer | Height of the output video in pixels |
| original_width | integer | Width of the original video in pixels |
| original_height | integer | Height of the original video in pixels |