Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c1fa846d
Commit
c1fa846d
authored
Jul 17, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: add sidechain compress audio filter
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
af08d8bf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
404 additions
and
1 deletion
+404
-1
Changelog
Changelog
+1
-0
filters.texi
doc/filters.texi
+62
-0
Makefile
libavfilter/Makefile
+1
-0
af_sidechaincompress.c
libavfilter/af_sidechaincompress.c
+338
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
version.h
libavfilter/version.h
+1
-1
No files found.
Changelog
View file @
c1fa846d
...
...
@@ -24,6 +24,7 @@ version <next>:
- Random filter
- deband filter
- AAC fixed-point decoding
- sidechaincompress audio filter
version 2.7:
...
...
doc/filters.texi
View file @
c1fa846d
...
...
@@ -622,6 +622,7 @@ slope
Specify the band-width of a filter in width_type units.
@end table
@anchor{amerge}
@section amerge
Merge two or more audio streams into a single multi-channel stream.
...
...
@@ -2020,6 +2021,7 @@ Applies only to double-pole filter.
The default is 0.707q and gives a Butterworth response.
@end table
@anchor{pan}
@section pan
Mix channels with specific gain levels. The filter accepts the output
...
...
@@ -2121,6 +2123,66 @@ At end of filtering it displays @code{track_gain} and @code{track_peak}.
Convert the audio sample format, sample rate and channel layout. It is
not meant to be used directly.
@section sidechaincompress
This filter acts like normal compressor but has the ability to compress
detected signal using second input signal.
It needs two input streams and returns one output stream.
First input stream will be processed depending on second stream signal.
The filtered signal then can be filtered with other filters in later stages of
processing. See @ref{pan} and @ref{amerge} filter.
The filter accepts the following options:
@table @option
@item threshold
If a signal of second stream raises above this level it will affect the gain
reduction of first stream.
By default is 0.125. Range is between 0.00097563 and 1.
@item ratio
Set a ratio about which the signal is reduced. 1:2 means that if the level
raised 4dB above the threshold, it will be only 2dB above after the reduction.
Default is 2. Range is between 1 and 20.
@item attack
Amount of milliseconds the signal has to rise above the threshold before gain
reduction starts. Default is 20. Range is between 0.01 and 2000.
@item release
Amount of milliseconds the signal has to fall bellow the threshold before
reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
@item makeup
Set the amount by how much signal will be amplified after processing.
Default is 2. Range is from 1 and 64.
@item knee
Curve the sharp knee around the threshold to enter gain reduction more softly.
Default is 2.82843. Range is between 1 and 8.
@item link
Choose if the @code{average} level between all channels of side-chain stream
or the louder(@code{maximum}) channel of side-chain stream affects the
reduction. Default is @code{average}.
@item detection
Should the exact signal be taken in case of @code{peak} or an RMS one in case
of @code{rms}. Default is @code{rms} which is mainly smoother.
@end table
@subsection Examples
@itemize
@item
Full ffmpeg example taking 2 audio inputs, 1st input to be compressed
depending on the signal of 2nd input and later compressed signal to be
merged with 2nd input:
@example
ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
@end example
@end itemize
@section silencedetect
Detect silence in an audio stream.
...
...
libavfilter/Makefile
View file @
c1fa846d
...
...
@@ -80,6 +80,7 @@ OBJS-$(CONFIG_LOWPASS_FILTER) += af_biquads.o
OBJS-$(CONFIG_PAN_FILTER)
+=
af_pan.o
OBJS-$(CONFIG_REPLAYGAIN_FILTER)
+=
af_replaygain.o
OBJS-$(CONFIG_RESAMPLE_FILTER)
+=
af_resample.o
OBJS-$(CONFIG_SIDECHAINCOMPRESS_FILTER)
+=
af_sidechaincompress.o
OBJS-$(CONFIG_SILENCEDETECT_FILTER)
+=
af_silencedetect.o
OBJS-$(CONFIG_SILENCEREMOVE_FILTER)
+=
af_silenceremove.o
OBJS-$(CONFIG_TREBLE_FILTER)
+=
af_biquads.o
...
...
libavfilter/af_sidechaincompress.c
0 → 100644
View file @
c1fa846d
This diff is collapsed.
Click to expand it.
libavfilter/allfilters.c
View file @
c1fa846d
...
...
@@ -96,6 +96,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
PAN
,
pan
,
af
);
REGISTER_FILTER
(
REPLAYGAIN
,
replaygain
,
af
);
REGISTER_FILTER
(
RESAMPLE
,
resample
,
af
);
REGISTER_FILTER
(
SIDECHAINCOMPRESS
,
sidechaincompress
,
af
);
REGISTER_FILTER
(
SILENCEDETECT
,
silencedetect
,
af
);
REGISTER_FILTER
(
SILENCEREMOVE
,
silenceremove
,
af
);
REGISTER_FILTER
(
TREBLE
,
treble
,
af
);
...
...
libavfilter/version.h
View file @
c1fa846d
...
...
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 2
8
#define LIBAVFILTER_VERSION_MINOR 2
9
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment