aboutsummaryrefslogtreecommitdiffstats
path: root/doc/filters.texi
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-01 10:59:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-01 10:59:21 +0200
commit1cba7fa364a9c95773d779ff5d5602be8391310e (patch)
tree0b54487634827c984c861d025798d689e4e5b195 /doc/filters.texi
parent0061ba044a44517d7291b80427cdebc5a1470c69 (diff)
parentb472938233b98178ed6c1353c37e0dc7ab585902 (diff)
downloadffmpeg-1cba7fa364a9c95773d779ff5d5602be8391310e.tar.gz
Merge commit 'b472938233b98178ed6c1353c37e0dc7ab585902'
* commit 'b472938233b98178ed6c1353c37e0dc7ab585902': lavfi: add an asetpts filter Conflicts: Changelog doc/filters.texi libavfilter/Makefile libavfilter/allfilters.c libavfilter/f_setpts.c libavfilter/setpts.c libavfilter/version.h libavfilter/vf_setpts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 89d3dd7acd..2813ff3d59 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -933,6 +933,75 @@ 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.