removesilence: GStreamer Bad Plugins 1.0 Plugins Reference Manual

## removesilence removesilence |

## Properties

guint64 | hysteresis | Read / Write
gboolean | remove | Read / Write
guint | minimum-silence-buffers | Read / Write
guint64 | minimum-silence-time | Read / Write
gboolean | silent | Read / Write
gboolean | squash | Read / Write
gint | threshold | Read / Write

## Types and Values

| GstRemoveSilence

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstRemoveSilence

## Description

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

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

## Synopsis

### Element Information

plugin | removesilence
author | Tiago Katcipis <tiagokatcipis@gmail.com> Paulo Pizarro <paulo.pizarro@gmail.com> Nicola Murino <nicola.murino@gmail.com>
class | Filter/Effect/Audio

### Element Pads

name | sink
direction | sink
presence | always
details | audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)1

name | src
direction | source
presence | always
details | audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)1

## Functions

## Types and Values

### GstRemoveSilence

    typedef struct _GstRemoveSilence GstRemoveSilence;

## Property Details

### The `“hysteresis”` property

      “hysteresis”               guint64

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

Owner: GstRemoveSilence

Flags: Read / Write

Allowed values: >= 1

Default value: 480

### The `“remove”` property

      “remove”                   gboolean

Set to true to remove silence from the stream, false otherwhise.

Owner: GstRemoveSilence

Flags: Read / Write

Default value: FALSE

### The `“minimum-silence-buffers”` property

      “minimum-silence-buffers”  guint

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

Owner: GstRemoveSilence

Flags: Read / Write

Allowed values: <= 10000

Default value: 0

### The `“minimum-silence-time”` property

      “minimum-silence-time”     guint64

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

Owner: GstRemoveSilence

Flags: Read / Write

Allowed values: <= 10000000000

Default value: 0

### The `“silent”` property

      “silent”                   gboolean

Disable/enable bus message notifications for silence detected/finished.

Owner: GstRemoveSilence

Flags: Read / Write

Default value: TRUE

### The `“squash”` property

      “squash”                   gboolean

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

Owner: GstRemoveSilence

Flags: Read / Write

Default value: FALSE

### The `“threshold”` property

      “threshold”                gint

Set the silence threshold used on the internal VAD in dB.

Owner: GstRemoveSilence

Flags: Read / Write

Allowed values: [-70,70]

Default value: -60