video filter

The FFmpeg pad filter

Adds bars around the frame to reach a target size without cropping the picture.

3 of 3 variants measured Measured 2026-08-20

The part that catches people

pad places the source at 0,0 unless told otherwise, so a naive pad puts your video in the top-left with all the padding on the right and bottom. Centring needs the (ow-iw)/2 expressions, which is the form almost every real command uses.

Measured, not described

Every row below is a real job. The same 1280x720 five-second H.264 source went through each variant, so the numbers are comparable to each other and to every other filter page on this site. Encode time is the FFmpeg step on its own, separated from the download and the upload.

VariantEncodeOutputCost
Pad to 16:9, centred1093 ms514.0 KB · 1280x720$0.0025
Pad to 1:1, centred636 ms298.0 KB · 720x720$0.0021
Pad with white bars1208 ms514.0 KB · 1280x720$0.0026

The exact commands

Pad to 16:9, centred

job_8fd9c90928c54eaf

The standard letterbox. Scale first, then pad.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=1280:-2,pad=1280:720:(ow-iw)/2:(oh-ih)/2" -t 5 out.mp4

Pad to 1:1, centred

job_e697435ed4df4538

Square output for feeds that crop to it.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=720:-2,pad=720:720:(ow-iw)/2:(oh-ih)/2" -t 5 out.mp4

Pad with white bars

job_f13cd6e3710d4cfa

The colour argument is positional and comes last.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=1280:-2,pad=1280:720:(ow-iw)/2:(oh-ih)/2:white" -t 5 out.mp4

How these numbers were produced

Each variant was submitted to the Rendobar API as an ffmpeg job against the same public source file, and the response was recorded verbatim. Encode time is the API's own per-step timing for the FFmpeg step. Output size is the byte count of the file the job produced. Cost is what the job was actually billed.

Nothing here was estimated, and the whole set is re-runnable, so if a figure looks wrong it can be checked rather than argued about. The 72 variants behind this filter reference cost $0.193082 in total to measure.

Frequently asked questions

What does the FFmpeg pad filter do?

Adds bars around the frame to reach a target size without cropping the picture.

What is the most common mistake with pad?

pad places the source at 0,0 unless told otherwise, so a naive pad puts your video in the top-left with all the padding on the right and bottom. Centring needs the (ow-iw)/2 expressions, which is the form almost every real command uses.

How long does pad take to run?

On a 1280x720 five-second H.264 source, the fastest variant on this page (Pad to 1:1, centred) spent 636 ms inside FFmpeg. That figure is the encode step alone, measured separately from the download and the upload, so it is the filter's own cost rather than the round trip.

Do I need FFmpeg installed to use pad?

Not with Rendobar. Every command on this page ran through the Rendobar API against a URL, with no local FFmpeg install and no server. The job id next to each row is the real job that produced the numbers.

Run pad without installing FFmpeg

Every command on this page ran through the API against a URL. No binary, no server.