setts

Set PTS and DTS in packets.

It accepts the following parameters:

ts
pts
dts

Set expressions for PTS, DTS or both.

duration

Set expression for duration.

time_base

Set output time base.

The expressions are evaluated through the eval API and can contain the following constants:

N

The count of the input packet. Starting from 0.

TS

The demux timestamp in input in case of ts or dts option or presentation timestamp in case of pts option.

POS

The original position in the file of the packet, or undefined if undefined for the current packet

DTS

The demux timestamp in input.

PTS

The presentation timestamp in input.

DURATION

The duration in input.

STARTDTS

The DTS of the first packet.

STARTPTS

The PTS of the first packet.

PREV_INDTS

The previous input DTS.

PREV_INPTS

The previous input PTS.

PREV_INDURATION

The previous input duration.

PREV_OUTDTS

The previous output DTS.

PREV_OUTPTS

The previous output PTS.

PREV_OUTDURATION

The previous output duration.

NEXT_DTS

The next input DTS.

NEXT_PTS

The next input PTS.

NEXT_DURATION

The next input duration.

TB

The timebase of stream packet belongs.

TB_OUT

The output timebase.

SR

The sample rate of stream packet belongs.

NOPTS

The AV_NOPTS_VALUE constant.

For example, to set PTS equal to DTS (not recommended if B-frames are involved):

ffmpeg -i INPUT -c:a copy -bsf:a setts=pts=DTS out.mkv