Commit 601eab2b authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add ladspa wrapper filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 547c2f00
......@@ -35,6 +35,7 @@ version <next>
- Fraps: use BT.709 colorspace by default for yuv, as reference fraps decoder does
- make decoding alpha optional for prores, ffv1 and vp6 by setting
the skip_alpha flag.
- ladspa wrapper filter
version 2.0:
......
......@@ -193,6 +193,7 @@ External library support:
--enable-frei0r enable frei0r video filtering
--enable-gnutls enable gnutls [no]
--disable-iconv disable iconv [autodetect]
--enable-ladspa enable LADSPA audio filtering
--enable-libaacplus enable AAC+ encoding via libaacplus [no]
--enable-libass enable libass subtitles rendering [no]
--enable-libbluray enable BluRay reading using libbluray [no]
......@@ -1162,6 +1163,7 @@ EXTERNAL_LIBRARY_LIST="
frei0r
gnutls
iconv
ladspa
libaacplus
libass
libbluray
......@@ -2210,6 +2212,7 @@ histeq_filter_deps="gpl"
hqdn3d_filter_deps="gpl"
interlace_filter_deps="gpl"
kerndeint_filter_deps="gpl"
ladspa_filter_deps="ladspa dlopen"
mcdeint_filter_deps="avcodec gpl"
movie_filter_deps="avcodec avformat"
mp_filter_deps="gpl avcodec swscale inline_asm"
......@@ -4210,6 +4213,7 @@ enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } ||
enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
enabled ladspa && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
enabled libass && require_pkg_config libass ass/ass.h ass_library_init
......
......@@ -1400,6 +1400,104 @@ ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
out
@end example
@section ladspa
Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin.
@table @option
@item file, f
Specifies the name of LADSPA plugin library to load. If the environment
variable @env{LADSPA_PATH} is defined, the LADSPA plugin is searched in
each one of the directories specified by the colon separated list in
@env{LADSPA_PATH}, otherwise in the standard LADSPA paths, which are in
this order: @file{HOME/.ladspa/lib/}, @file{/usr/local/lib/ladspa/},
@file{/usr/lib/ladspa/}.
@item plugin, p
Specifies the plugin within the library. Some libraries contain only
one plugin, but others contain many of them. If this is not set filter
will list all available plugins within the specified library.
@item controls, c
Set the '|' separated list of controls which are zero or more floating point
values that determine the behavior of the loaded plugin (for example delay,
threshold or gain).
Controls need to be defined using the following syntax:
c0=@var{value0}|c1=@var{value1}|c2=@var{value2}|..., where
@var{valuei} is the value set on the @var{i}-th control.
If @option{controls} is set to @code{help}, all available controls and
their valid ranges are printed.
@item sample_rate, s
Specify the sample rate, default to 44100. Only used if plugin have
zero inputs.
@item nb_samples, n
Set the number of samples per channel per each output frame, default
is 1024. Only used if plugin have zero inputs.
@item duration, d
Set the minimum duration of the sourced audio. See the function
@code{av_parse_time()} for the accepted format, also check the "Time duration"
section in the ffmpeg-utils manual.
Note that the resulting duration may be greater than the specified duration,
as the generated audio is always cut at the end of a complete frame.
If not specified, or the expressed duration is negative, the audio is
supposed to be generated forever.
Only used if plugin have zero inputs.
@end table
@subsection Examples
@itemize
@item
List all available plugins within amp (LADSPA example plugin) library:
@example
ladspa=file=amp
@end example
@item
List all available controls and their valid ranges for @code{vcf_notch}
plugin from @code{VCF} library:
@example
ladspa=f=vcf:p=vcf_notch:c=help
@end example
@item
Simulate low quality audio equipment using @code{Computer Music Toolkit} (CMT)
plugin library:
@example
ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
@end example
@item
Add reverberation to the audio using TAP-plugins
(Tom's Audio Processing plugins):
@example
ladspa=file=tap_reverb:tap_reverb
@end example
@item
Generate white noise, with 0.2 amplitude:
@example
ladspa=file=cmt:noise_source_white:c=c0=.2
@end example
@item
Generate 20 bpm clicks using plugin @code{C* Click - Metronome} from the
@code{C* Audio Plugin Suite} (CAPS) library:
@example
ladspa=file=caps:Click:c=c1=20'
@end example
@item
Apply @code{C* Eq10X2 - Stereo 10-band equaliser} effect:
@example
ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
@end example
@end itemize
@section lowpass
Apply a low-pass filter with 3dB point frequency.
......
......@@ -91,6 +91,7 @@ OBJS-$(CONFIG_EBUR128_FILTER) += f_ebur128.o
OBJS-$(CONFIG_EQUALIZER_FILTER) += af_biquads.o
OBJS-$(CONFIG_HIGHPASS_FILTER) += af_biquads.o
OBJS-$(CONFIG_JOIN_FILTER) += af_join.o
OBJS-$(CONFIG_LADSPA_FILTER) += af_ladspa.o
OBJS-$(CONFIG_LOWPASS_FILTER) += af_biquads.o
OBJS-$(CONFIG_PAN_FILTER) += af_pan.o
OBJS-$(CONFIG_RESAMPLE_FILTER) += af_resample.o
......
This diff is collapsed.
......@@ -87,6 +87,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(EQUALIZER, equalizer, af);
REGISTER_FILTER(HIGHPASS, highpass, af);
REGISTER_FILTER(JOIN, join, af);
REGISTER_FILTER(LADSPA, ladspa, af);
REGISTER_FILTER(LOWPASS, lowpass, af);
REGISTER_FILTER(PAN, pan, af);
REGISTER_FILTER(RESAMPLE, resample, af);
......
......@@ -30,8 +30,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 86
#define LIBAVFILTER_VERSION_MICRO 102
#define LIBAVFILTER_VERSION_MINOR 87
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
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