mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
doc/filters: document asetpts in single place
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
e6d4e68755
commit
b937d3694e
@ -933,75 +933,6 @@ disable padding for the last frame, use:
|
|||||||
asetnsamples=n=1234:p=0
|
asetnsamples=n=1234:p=0
|
||||||
@end example
|
@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
|
@section asetrate
|
||||||
|
|
||||||
Set the sample rate without altering the PCM data.
|
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
|
the presentation timestamp in input
|
||||||
|
|
||||||
@item N
|
@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
|
@item NB_CONSUMED_SAMPLES
|
||||||
the number of consumed samples, not including the current frame (only
|
the number of consumed samples, not including the current frame (only
|
||||||
audio)
|
audio)
|
||||||
|
|
||||||
@item NB_SAMPLES
|
@item NB_SAMPLES, S
|
||||||
the number of samples in the current frame (only audio)
|
the number of samples in the current frame (only audio)
|
||||||
|
|
||||||
@item SAMPLE_RATE
|
@item SAMPLE_RATE, SR
|
||||||
audio sample rate
|
audio sample rate
|
||||||
|
|
||||||
@item STARTPTS
|
@item STARTPTS
|
||||||
@ -8070,6 +8002,13 @@ Generate timestamps from a "live source" and rebase onto the current timebase:
|
|||||||
@example
|
@example
|
||||||
setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
|
setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
Generate timestamps by counting samples:
|
||||||
|
@example
|
||||||
|
asetpts=N/SR/TB
|
||||||
|
@end example
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@section settb, asettb
|
@section settb, asettb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user