720p, height computed
job_086816ae11534c48The safe form. -2 keeps the aspect ratio and guarantees an even height.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=1280:-2" -t 5 out.mp4Resizes video to a target width and height, with optional aspect-preserving arithmetic.
Use -2, not -1, for the dimension you want computed. H.264 requires even dimensions, and -1 will happily produce an odd number that makes libx264 fail with 'width not divisible by 2'. -2 rounds to the nearest even value.
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.
| Variant | Encode | Output | Cost |
|---|---|---|---|
| 720p, height computed | 3935 ms | 514.0 KB · 1280x720 | $0.0059 |
| 480p, height computed | 772 ms | 346.3 KB · 854x480 | $0.0023 |
| Fit inside a box | 4126 ms | 514.0 KB · 1280x720 | $0.0057 |
The safe form. -2 keeps the aspect ratio and guarantees an even height.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=1280:-2" -t 5 out.mp4Same arithmetic at a smaller target, to show how output size scales.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=854:-2" -t 5 out.mp4Letterbox-free fit. Never upscales past the box on either axis.
ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "scale=w=1280:h=720:force_original_aspect_ratio=decrease" -t 5 out.mp4Each 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.
Resizes video to a target width and height, with optional aspect-preserving arithmetic.
Use -2, not -1, for the dimension you want computed. H.264 requires even dimensions, and -1 will happily produce an odd number that makes libx264 fail with 'width not divisible by 2'. -2 rounds to the nearest even value.
On a 1280x720 five-second H.264 source, the fastest variant on this page (480p, height computed) spent 772 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.
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.
Every command on this page ran through the API against a URL. No binary, no server.