Smart Reframe

Content-aware aspect ratio conversion with subject tracking and optional trim

You send a video URL and a target aspect ratio (e.g. 9:16, 1:1, 4:5). The service analyzes the video to detect subjects and important content, then reframes (crops and pans) each frame so that key content stays in view at the new aspect ratio. Optional trim (start/end in seconds or hh:mm:ss) lets you process only a portion of the video. An optional smart camera pan mode smooths the reframing motion for a natural look. Async: submit job, poll until completed, download the reframed video.

videoprocessingstudio

Overview

Features

Content-aware reframing

The service detects subjects and action in each frame and positions the crop window to keep important content visible at the target aspect ratio.

Multiple aspect ratios

Target any standard ratio: 9:16 (vertical/Reels/TikTok), 1:1 (square/Instagram), 4:5 (portrait), or custom.

Optional trim

Specify start and/or end (seconds or hh:mm:ss) to process only a portion of the video. Reduces processing time and billed duration.

Smart camera pan

Optional smooth panning mode that produces natural, cinematic camera movement instead of hard cuts between crop positions.

Use Cases

Social vertical clips

Convert 16:9 horizontal video to 9:16 vertical for Reels, TikTok, or Shorts, keeping subjects centered.

Multi-format delivery

Produce square (1:1) and portrait (4:5) versions from one master horizontal video.

Clip extraction

Trim + reframe in one step: extract a 30-second highlight from a long video and reframe it for vertical.

Input / Output

Input

Video URL, target aspect ratio, optional start/end for trim, optional smart_camera_pan

JSON body

Output

Reframed video URL (async job result)

JSONmedia URL

Specs

Latency
Async; depends on video duration and resolution
Async
true
Rate Limit
Per API key
Max Input
Duration and resolution dependent

Quickstart

Prerequisites

  • -A CN8 Gateway API key with studio-smart-reframe service enabled
  • -A video URL (use upload-media to get one if needed)

1. Submit reframe job

studio-smart-reframe

POST with the video URL, target aspect ratio, and optional trim/pan settings.

POST/v1/proxy/studio-smart-reframe
{
  "videoUrl": "https://example.com/video.mp4",
  "aspect_ratio": "9:16",
  "start": 10,
  "end": 40
}

Response

{
  "status": "accepted",
  "job_id": "job_reframe_abc",
  "service": "studio-smart-reframe"
}

Poll the job endpoint until completed; then use the output URL to download the reframed video.

2. Get result

When the job is completed, the result contains the output video URL at the target aspect ratio.

Smart Reframe

POSTasync

Content-aware aspect ratio conversion. Detects subjects and reframes to keep important content visible. Supports trim and smart camera pan. Async.

/v1/proxy/studio-smart-reframe

Pricing

Billed per second of source video (after trim if applied).

ServiceUnitPrice
Smart Reframesecond$0.04/second
  • -Using start/end trim reduces the processed segment and thus the billed duration.

Guides & Tips

What happens under the hood

  • -If start/end are provided, the source video is trimmed first (using ffmpeg, stream copy when possible).
  • -The service runs subject detection on the (trimmed) video and determines optimal crop positions per frame at the target aspect ratio.
  • -Frames are cropped and the output is encoded as a video at the target aspect ratio.
  • -If smart_camera_pan is enabled, crop positions are smoothed over time for natural panning instead of abrupt jumps.

Trim rules

  • -start + end: process [start, end].
  • -start only: process from start to end of video.
  • -end only: process from beginning to end.
  • -Neither: process entire video.

Aspect ratio examples

  • -9:16: vertical (Reels, TikTok, Shorts)
  • -1:1: square (Instagram feed)
  • -4:5: portrait (Instagram portrait)
  • -16:9: horizontal (YouTube, standard)

FAQ

Q: Which aspect ratios are supported?

A: Any ratio in 'W:H' format. Common values: 9:16, 1:1, 4:5, 16:9.

Q: Does the output keep audio?

A: Yes. The original audio is preserved in the output.

Q: What is smart camera pan?

A: When enabled, the crop window moves smoothly between frames instead of jumping, producing cinematic panning.

Q: Can I process only part of the video?

A: Yes. Use start and/or end to trim before reframing. This also reduces billing.

Related Products

Changelog

1.0 (2026-01-26)

  • -Initial catalog.

1.1 (2026-02-23)

  • -Aligned with smart_reframe_service: content-aware subject tracking, trim (start/end with seconds or hh:mm:ss), smart_camera_pan option, any W:H aspect ratio. No model name in docs.