removesilence

Removes all silence periods from an audio stream, dropping silence buffers. If the "silent" property is disabled, removesilence will generate bus messages named "removesilence". The message's structure contains one of these fields:

  • guint64 "silence_detected": the PTS for the first silent buffer after a non silence period.

  • guint64 "silence_finished": the PTS for the first non silent buffer after a silence period.

Example launch line

 gst-launch-1.0 -v -m filesrc location="audiofile" ! decodebin ! removesilence remove=true ! wavenc ! filesink location=without_audio.wav

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseTransform
                    ╰──removesilence

Factory details

Authors: – Tiago Katcipis , Paulo Pizarro , Nicola Murino

Classification:Filter/Effect/Audio

Rank – none

Plugin – removesilence

Package – GStreamer Bad Plug-ins

Pad Templates

sink

audio/x-raw:
         format: S16LE
         layout: interleaved
           rate: [ 1, 2147483647 ]
       channels: 1

Presencealways

Directionsink

Object typeGstPad


src

audio/x-raw:
         format: S16LE
         layout: interleaved
           rate: [ 1, 2147483647 ]
       channels: 1

Presencealways

Directionsrc

Object typeGstPad


Properties

hysteresis

“hysteresis” guint64

Set the hysteresis (on samples) used on the internal VAD

Flags : Read / Write

Default value : 480


minimum-silence-buffers

“minimum-silence-buffers” guint

Define the minimum number of consecutive silence buffers before removing silence, 0 means disabled. This will not introduce latency

Flags : Read / Write

Default value : 0


minimum-silence-time

“minimum-silence-time” guint64

Define the minimum silence time in nanoseconds before removing silence, 0 means disabled. This will not introduce latency

Flags : Read / Write

Default value : 0


remove

“remove” gboolean

Set to true to remove silence from the stream, false otherwise

Flags : Read / Write

Default value : false


silent

“silent” gboolean

Disable/enable bus message notifications for silence detected/finished

Flags : Read / Write

Default value : true


squash

“squash” gboolean

Set to true to retimestamp buffers when silence is removed and so avoid timestamp gap

Flags : Read / Write

Default value : false


threshold

“threshold” gint

Set the silence threshold used on the internal VAD in dB

Flags : Read / Write

Default value : -60


The results of the search are