doc/filters: document asetpts in single place

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-05-02 22:14:59 +00:00
parent e6d4e68755
commit b937d3694e

View File

@ -933,75 +933,6 @@ disable padding for the last frame, use:
asetnsamples=n=1234:p=0
@end example
@section asetpts
Change the PTS (presentation timestamp) of the input audio frames.
This filter accepts the following options:
@table @option
@item expr
The expression which is evaluated for each frame to construct its timestamp.
@end table
The expression is evaluated through the eval API and can contain the following
constants:
@table @option
@item PTS
the presentation timestamp in input
@item PI
Greek PI
@item PHI
golden ratio
@item E
Euler number
@item N
Number of the audio samples pass through the filter so far, starting at 0.
@item S
Number of the audio samples in the current frame.
@item SR
Audio sample rate.
@item STARTPTS
the PTS of the first frame
@item PREV_INPTS
previous input PTS
@item PREV_OUTPTS
previous output PTS
@item RTCTIME
wallclock (RTC) time in microseconds
@item RTCSTART
wallclock (RTC) time at the start of the movie in microseconds
@end table
Some examples follow:
@example
# start counting PTS from zero
asetpts=expr=PTS-STARTPTS
#generate timestamps by counting samples
asetpts=expr=N/SR/TB
# generate timestamps from a "live source" and rebase onto the current timebase
asetpts='(RTCTIME - RTCSTART) / (TB * 1000000)"
@end example
@section asetrate
Set the sample rate without altering the PCM data.
@ -7975,16 +7906,17 @@ frame rate, only defined for constant frame-rate video
the presentation timestamp in input
@item N
the count of the input frame, starting from 0.
the count of the input frame for video or the number of consumed samples,
not including the current frame for audio, starting from 0.
@item NB_CONSUMED_SAMPLES
the number of consumed samples, not including the current frame (only
audio)
@item NB_SAMPLES
@item NB_SAMPLES, S
the number of samples in the current frame (only audio)
@item SAMPLE_RATE
@item SAMPLE_RATE, SR
audio sample rate
@item STARTPTS
@ -8070,6 +8002,13 @@ Generate timestamps from a "live source" and rebase onto the current timebase:
@example
setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
@end example
@item
Generate timestamps by counting samples:
@example
asetpts=N/SR/TB
@end example
@end itemize
@section settb, asettb