summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-12-14 21:33:48 +0100
committerNicolas George <nicolas.george@normalesup.org>2011-12-31 16:16:24 +0100
commite90a69e9550800728f36efc3ea804ccd8d1d8380 (patch)
treec8dca4df418da657b3eb08e9d013ede95eb118d9 /doc
parente6362f3a3cfbabf457fc7ebb2205cbfc043501ee (diff)
lavfi: add astreamsync audio filter.
Diffstat (limited to 'doc')
-rw-r--r--doc/filters.texi29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 387a05e6a7..487ec210c7 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -237,6 +237,35 @@ For example:
will create two separate outputs from the same input, one cropped and
one padded.
+@section astreamsync
+
+Forward two audio streams and control the order the buffers are forwarded.
+
+The argument to the filter is an expression deciding which stream should be
+forwarded next: if the result is negative, the first stream is forwarded; if
+the result is positive or zero, the second stream is forwarded. It can use
+the following variables:
+
+@table @var
+@item b1 b2
+number of buffers forwarded so far on each stream
+@item s1 s2
+number of samples forwarded so far on each stream
+@item t1 t2
+current timestamp of each stream
+@end table
+
+The default value is @code{t1-t2}, which means to always forward the stream
+that has a smaller timestamp.
+
+Example: stress-test @code{amerge} by randomly sending buffers on the wrong
+input, while avoiding too much of a desynchronization:
+@example
+amovie=file.ogg [a] ; amovie=file.mp3 [b] ;
+[a] [b] astreamsync=(2*random(1))-1+tanh(5*(t1-t2)) [a2] [b2] ;
+[a2] [b2] amerge
+@end example
+
@section earwax
Make audio easier to listen to on headphones.