ForHosting KIT · Video

Build an adaptive streaming bitrate ladder from a source resolution

An adaptive streaming ladder gives a player several versions of the same video so it can respond to changing bandwidth and screen conditions.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

This capability turns a source width and height into a deterministic set of 1080p, 720p, 480p, and 360p renditions that fit the source. It preserves aspect ratio and orientation, keeps encoder-friendly even dimensions, and adjusts the standard bitrate targets for the actual number of pixels in each output. The result is ready to use as a starting point for HLS or DASH encoding plans.

Start with the real source dimensions

Enter the stored pixel width and height of the source video, before any display rotation or player-side scaling. The calculator compares the shorter and longer source sides with the envelopes used by common 1080p, 720p, 480p, and 360p renditions. It never invents pixels: a rung is included only when the source is large enough in both directions for that standard profile. A 1920 by 1080 source therefore receives all four rungs, while a 1280 by 720 source begins at 720p. Portrait material follows the same rule with its orientation preserved, so a vertical source produces vertical outputs rather than being forced into landscape frames. Both dimensions must be positive whole numbers no greater than the declared input limit. A source below the 640 by 360 landscape envelope, or its 360 by 640 portrait counterpart, cannot produce the minimum rung without upscaling and is rejected. Check rotated phone footage carefully: supply the effective displayed dimensions if rotation metadata changes which side is horizontal.

Understand how dimensions and bitrates are calculated

For every eligible profile, the shorter source side is scaled to the rung value and the longer side is calculated from the source aspect ratio. The calculated side is rounded down to an even integer because common H.264 and H.265 workflows expect dimensions that divide cleanly into chroma blocks. This can change the exact aspect ratio by a tiny fraction of a pixel, but it avoids accidental cropping or padding rules hidden inside an encoder. Each profile begins with a conventional AVC video target: 5,000 kbps for 1080p, 2,800 kbps for 720p, 1,400 kbps for 480p, and 800 kbps for 360p. The algorithm then scales that target by the output pixel count relative to the profile's 16:9 reference frame and rounds to the nearest 50 kbps. It also supplies a maximum rate at 107 percent of target and a two-second-style buffer value at twice the target. These are planning values, not guarantees of visual quality.

Use the ladder as an encoding baseline

Map each returned rung to an encoder output and package the resulting streams into the same HLS master playlist or DASH presentation. Keep frame rate, keyframe cadence, color handling, audio layout, and segment boundaries consistent across renditions so a player can switch cleanly. The bitrate values are deliberately predictable and suitable for estimates, templates, and first-pass configurations, but content complexity still matters. Animation, film grain, sports, screen recordings, and low-light noise can need very different rates at the same resolution. Validate representative scenes with an objective quality metric and playback tests, then raise or lower individual targets if your codec, frame rate, or quality requirement demands it. The output contains video rates only; budget audio separately when calculating total bandwidth. Also leave delivery headroom above the combined video and audio rate. For production services, monitor rebuffering, startup delay, rendition selection, and quality after launch, because viewer network behavior is the final test of whether a ladder is balanced.

Create an HLS encoding plan

Turn source dimensions into a consistent set of rendition sizes and video bitrate targets before generating a master playlist.

Estimate transcoding outputs

Preview how many standard renditions a source can support and the approximate bandwidth of each output.

Standardize vertical and unusual aspect ratios

Preserve source orientation while adapting familiar streaming profiles to the actual pixel count of non-16:9 video.

What does the calculation cost?

Each API request costs $0.002.

Does the ladder upscale small sources?

No. Rungs that exceed either normalized source dimension are omitted, and a source below the 360p envelope returns an error.

Are the returned bitrates for video or total stream bandwidth?

They are video bitrate targets. Add the selected audio bitrate and delivery overhead when estimating total bandwidth.

Does it support portrait video?

Yes. Portrait orientation is preserved, and each standard rung is fitted to the source aspect ratio with even output dimensions.

Why can the width differ from familiar values such as 1920 or 1280?

The familiar widths assume 16:9 video. Other aspect ratios need a different width to preserve the source image without cropping.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/video2/streaming-bitrate-ladder

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/video2/streaming-bitrate-ladder \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source_width":1920,"source_height":1080}'
{
  "source_width": 1920,
  "source_height": 1080
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "video2.streaming_bitrate_ladder",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb500
max_minutes60
max_megapixels3.9
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →