FFmpeg 4.3.8
Since* 0.11
#

Convert the video to specified constant frame rate by duplicating or dropping frames as necessary.

It accepts the following parameters:

fps

The desired output frame rate. The default is 25.

start_time

Assume the first PTS should be the given value, in seconds. This allows for padding/trimming at the start of stream. By default, no assumption is made about the first frame’s expected PTS, so no padding or trimming is done. For example, this could be set to 0 to pad the beginning with duplicates of the first frame if a video stream starts after the audio stream or to trim any frames with a negative PTS.

round

Timestamp (PTS) rounding method.

Possible values are:

zero

round towards 0

inf

round away from 0

down

round towards -infinity

up

round towards +infinity

near

round to nearest

The default is near.

eof_action

Action performed when reading the last frame.

Possible values are:

round

Use same timestamp rounding method as used for other frames.

pass

Pass through last frame if input duration has not been reached yet.

The default is round.

Alternatively, the options can be specified as a flat string: fps[:start_time[:round]].

See also the setpts filter.

#

Examples

  • A typical usage in order to set the fps to 25:

    fps=fps=25
  • Sets the fps to 24, using abbreviation and rounding method to round to nearest:

    fps=fps=film:round=near