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
42261964
Commit
42261964
authored
Jul 02, 2014
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add silenceremove filter
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
1e4e760f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
558 additions
and
2 deletions
+558
-2
Changelog
Changelog
+1
-0
MAINTAINERS
MAINTAINERS
+1
-0
RELEASE_NOTES
RELEASE_NOTES
+1
-0
filters.texi
doc/filters.texi
+69
-0
Makefile
libavfilter/Makefile
+1
-0
af_silenceremove.c
libavfilter/af_silenceremove.c
+482
-0
allfilters.c
libavfilter/allfilters.c
+1
-0
version.h
libavfilter/version.h
+2
-2
No files found.
Changelog
View file @
42261964
...
...
@@ -13,6 +13,7 @@ version <next>:
- added codecview filter to visualize information exported by some codecs
- Matroska 3D support thorugh side data
- HTML generation using texi2html is deprecated in favor of makeinfo/texi2any
- silenceremove filter
version 2.3:
...
...
MAINTAINERS
View file @
42261964
...
...
@@ -343,6 +343,7 @@ Filters:
af_compand.c Paul B Mahol
af_ladspa.c Paul B Mahol
af_pan.c Nicolas George
af_silenceremove.c Paul B Mahol
avf_avectorscope.c Paul B Mahol
avf_showcqt.c Muhammad Faiz
vf_blend.c Paul B Mahol
...
...
RELEASE_NOTES
View file @
42261964
...
...
@@ -42,6 +42,7 @@
• ported lenscorrection filter from frei0r filter
• large optimizations in dctdnoiz to make it usable
• added codecview filter to visualize information exported by some codecs
• added silenceremove filter
┌────────────────────────────┐
│ libavutil │
...
...
doc/filters.texi
View file @
42261964
...
...
@@ -1875,6 +1875,75 @@ ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
@end example
@end itemize
@section silenceremove
Remove silence from the beginning, middle or end of the audio.
The filter accepts the following options:
@table @option
@item start_periods
This value is used to indicate if audio should be trimmed at beginning of
the audio. A value of zero indicates no silence should be trimmed from the
beginning. When specifying a non-zero value, it trims audio up until it
finds non-silence. Normally, when trimming silence from beginning of audio
the @var{start_periods} will be @code{1} but it can be increased to higher
values to trim all audio up to specific count of non-silence periods.
Default value is @code{0}.
@item start_duration
Specify the amount of time that non-silence must be detected before it stops
trimming audio. By increasing the duration, bursts of noises can be treated
as silence and trimmed off. Default value is @code{0}.
@item start_threshold
This indicates what sample value should be treated as silence. For digital
audio, a value of @code{0} may be fine but for audio recorded from analog,
you may wish to increase the value to account for background noise.
Can be specified in dB (in case "dB" is appended to the specified value)
or amplitude ratio. Default value is @code{0}.
@item stop_periods
Set the count for trimming silence from the end of audio.
To remove silence from the middle of a file, specify a @var{stop_periods}
that is negative. This value is then threated as a positive value and is
used to indicate the effect should restart processing as specified by
@var{start_periods}, making it suitable for removing periods of silence
in the middle of the audio.
Default value is @code{0}.
@item stop_duration
Specify a duration of silence that must exist before audio is not copied any
more. By specifying a higher duration, silence that is wanted can be left in
the audio.
Default value is @code{0}.
@item stop_threshold
This is the same as @option{start_threshold} but for trimming silence from
the end of audio.
Can be specified in dB (in case "dB" is appended to the specified value)
or amplitude ratio. Default value is @code{0}.
@item leave_silence
This indicate that @var{stop_duration} length of audio should be left intact
at the beginning of each period of silence.
For example, if you want to remove long pauses between words but do not want
to remove the pauses completely. Default value is @code{0}.
@end table
@subsection Examples
@itemize
@item
The following example shows how this filter can be used to start a recording
that does not contain the delay at the start which usually occurs between
pressing the record button and the start of the performance:
@example
silenceremove=1:5:0.02
@end example
@end itemize
@section treble
Boost or cut treble (upper) frequencies of the audio using a two-pole
...
...
libavfilter/Makefile
View file @
42261964
...
...
@@ -78,6 +78,7 @@ OBJS-$(CONFIG_PAN_FILTER) += af_pan.o
OBJS-$(CONFIG_REPLAYGAIN_FILTER)
+=
af_replaygain.o
OBJS-$(CONFIG_RESAMPLE_FILTER)
+=
af_resample.o
OBJS-$(CONFIG_SILENCEDETECT_FILTER)
+=
af_silencedetect.o
OBJS-$(CONFIG_SILENCEREMOVE_FILTER)
+=
af_silenceremove.o
OBJS-$(CONFIG_TREBLE_FILTER)
+=
af_biquads.o
OBJS-$(CONFIG_VOLUME_FILTER)
+=
af_volume.o
OBJS-$(CONFIG_VOLUMEDETECT_FILTER)
+=
af_volumedetect.o
...
...
libavfilter/af_silenceremove.c
0 → 100644
View file @
42261964
This diff is collapsed.
Click to expand it.
libavfilter/allfilters.c
View file @
42261964
...
...
@@ -96,6 +96,7 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
REPLAYGAIN
,
replaygain
,
af
);
REGISTER_FILTER
(
RESAMPLE
,
resample
,
af
);
REGISTER_FILTER
(
SILENCEDETECT
,
silencedetect
,
af
);
REGISTER_FILTER
(
SILENCEREMOVE
,
silenceremove
,
af
);
REGISTER_FILTER
(
TREBLE
,
treble
,
af
);
REGISTER_FILTER
(
VOLUME
,
volume
,
af
);
REGISTER_FILTER
(
VOLUMEDETECT
,
volumedetect
,
af
);
...
...
libavfilter/version.h
View file @
42261964
...
...
@@ -30,8 +30,8 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR
0
#define LIBAVFILTER_VERSION_MICRO 10
3
#define LIBAVFILTER_VERSION_MINOR
1
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
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