setpts, asetpts


Change the PTS (presentation timestamp) of the input frames.

setpts works on video frames, asetpts on audio frames.

This filter accepts the following options:

'expr'

The expression which is evaluated for each frame to construct its timestamp.

The expression is evaluated through the eval API and can contain the following constants:

'FRAME_RATE, FR'

frame rate, only defined for constant frame-rate video

'PTS'

The presentation timestamp in input

'N'

The count of the input frame for video or the number of consumed samples, not including the current frame for audio, starting from 0.

'NB_CONSUMED_SAMPLES'

The number of consumed samples, not including the current frame (only audio)

'NB_SAMPLES, S'

The number of samples in the current frame (only audio)

'SAMPLE_RATE, SR'

The audio sample rate.

'STARTPTS'

The PTS of the first frame.

'STARTT'

the time in seconds of the first frame

'INTERLACED'

State whether the current frame is interlaced.

'T'

the time in seconds of the current frame

'POS'

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

'PREV_INPTS'

The previous input PTS.

'PREV_INT'

previous input time in seconds

'PREV_OUTPTS'

The previous output PTS.

'PREV_OUTT'

previous output time in seconds

'RTCTIME'

The wallclock (RTC) time in microseconds. This is deprecated, use time(0) instead.

'RTCSTART'

The wallclock (RTC) time at the start of the movie in microseconds.

'TB'

The timebase of the input timestamps.