video filter

The FFmpeg setpts filter

Rewrites presentation timestamps, which is how video speed is changed.

3 of 3 variants measured Measured 2026-08-20

The part that catches people

setpts changes video speed and does nothing to audio, so speeding up video alone desynchronises the sound. The audio side needs atempo with the reciprocal factor, and the two numbers are inverses of each other, which is a common off-by-inversion bug.

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
2x faster735 ms453.0 KB · 1280x720$0.0021
Half speed650 ms288.1 KB · 1280x720$0.0020
Rebase to zero939 ms514.0 KB · 1280x720$0.0023

The exact commands

2x faster

job_22571583f69e4332

Halve the timestamps to double the speed.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "setpts=0.5*PTS" -t 5 out.mp4

Half speed

job_e61dcf5da1744157

Double the timestamps to halve the speed.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "setpts=2.0*PTS" -t 5 out.mp4

Rebase to zero

job_b419d4c413314625

No speed change. The companion to trim.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "setpts=PTS-STARTPTS" -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 setpts filter do?

Rewrites presentation timestamps, which is how video speed is changed.

What is the most common mistake with setpts?

setpts changes video speed and does nothing to audio, so speeding up video alone desynchronises the sound. The audio side needs atempo with the reciprocal factor, and the two numbers are inverses of each other, which is a common off-by-inversion bug.

How long does setpts take to run?

On a 1280x720 five-second H.264 source, the fastest variant on this page (Half speed) spent 650 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 setpts?

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 setpts without installing FFmpeg

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