video filter

The FFmpeg select filter

Keeps only frames matching an expression, used for thumbnails and keyframes.

3 of 3 variants measured Measured 2026-08-20

The part that catches people

Selecting frames does not renumber them, so the output inherits sparse timestamps and plays at the wrong rate. Pair it with setpts=N/FRAME_RATE/TB or the result is a video that appears to hang.

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
Keyframes only259 ms84.2 KB · 1280x720$0.0017
Every 30th frame292 ms130.9 KB · 1280x720$0.0018
One frame per second316 ms234.8 KB · 1280x720$0.0018

The exact commands

Keyframes only

job_6d23fbdf928f4ae5

The I-frame extract, correctly rebased.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "select='eq(pict_type\,I)',setpts=N/FRAME_RATE/TB" -t 5 out.mp4

Every 30th frame

job_990386eebe424176

Sampling by frame index.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "select='not(mod(n\,30))',setpts=N/FRAME_RATE/TB" -t 5 out.mp4

One frame per second

job_1e65d79263ae4ba4

Deliberately missing the rebase, to show the failure.

ffmpeg -i https://cdn.rendobar.com/assets/examples/sample.mp4 -vf "select='not(mod(n\,30))'" -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 select filter do?

Keeps only frames matching an expression, used for thumbnails and keyframes.

What is the most common mistake with select?

Selecting frames does not renumber them, so the output inherits sparse timestamps and plays at the wrong rate. Pair it with setpts=N/FRAME_RATE/TB or the result is a video that appears to hang.

How long does select take to run?

On a 1280x720 five-second H.264 source, the fastest variant on this page (Keyframes only) spent 259 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 select?

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

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