summaryrefslogtreecommitdiff
path: root/doc/filters.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/filters.texi')
-rw-r--r--doc/filters.texi69
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 0f1fd39a5e..0a36f5f1e0 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -192,6 +192,75 @@ stream ends. The default value is 2 seconds.
Pass the audio source unchanged to the output.
+@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 ashowinfo
Show a line containing various information for each input audio frame.