Commit c7448c18 authored by Justin Ruggles's avatar Justin Ruggles

lavfi: add audio mix filter

parent 1e8561e3
......@@ -20,6 +20,7 @@ version <next>:
- audio filters support in libavfilter and avconv
- add fps filter
- audio split filter
- audio mix filter
version 0.8:
......
......@@ -133,6 +133,44 @@ For example to force the output to either unsigned 8-bit or signed 16-bit stereo
aformat=sample_fmts\=u8\,s16:channel_layouts\=stereo
@end example
@section amix
Mixes multiple audio inputs into a single output.
For example
@example
avconv -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
@end example
will mix 3 input audio streams to a single output with the same duration as the
first input and a dropout transition time of 3 seconds.
The filter accepts the following named parameters:
@table @option
@item inputs
Number of inputs. If unspecified, it defaults to 2.
@item duration
How to determine the end-of-stream.
@table @option
@item longest
Duration of longest input. (default)
@item shortest
Duration of shortest input.
@item first
Duration of first input.
@end table
@item dropout_transition
Transition time, in seconds, for volume renormalization when an input
stream ends. The default value is 2 seconds.
@end table
@section anull
Pass the audio source unchanged to the output.
......
......@@ -25,6 +25,7 @@ OBJS = allfilters.o \
video.o \
OBJS-$(CONFIG_AFORMAT_FILTER) += af_aformat.o
OBJS-$(CONFIG_AMIX_FILTER) += af_amix.o
OBJS-$(CONFIG_ANULL_FILTER) += af_anull.o
OBJS-$(CONFIG_ASPLIT_FILTER) += split.o
OBJS-$(CONFIG_ASYNCTS_FILTER) += af_asyncts.o
......
This diff is collapsed.
......@@ -35,6 +35,7 @@ void avfilter_register_all(void)
initialized = 1;
REGISTER_FILTER (AFORMAT, aformat, af);
REGISTER_FILTER (AMIX, amix, af);
REGISTER_FILTER (ANULL, anull, af);
REGISTER_FILTER (ASPLIT, asplit, af);
REGISTER_FILTER (ASYNCTS, asyncts, af);
......
......@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 19
#define LIBAVFILTER_VERSION_MINOR 20
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment