From b472938233b98178ed6c1353c37e0dc7ab585902 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 10 Apr 2013 16:28:38 +0200 Subject: lavfi: add an asetpts filter --- doc/filters.texi | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) (limited to 'doc/filters.texi') 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. -- cgit v1.2.3