opusenc

This element encodes raw audio to OPUS.

Example pipelines

 gst-launch-1.0 -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! opusenc ! oggmux ! filesink location=sine.ogg

Encode a test sine signal to Ogg/OPUS.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstAudioEncoder
                    ╰──opusenc

Factory details

Authors: – Vincent Penquerc'h

Classification:Codec/Encoder/Audio

Rank – primary

Plugin – gstopus

Package – GStreamer Base Plug-ins

Pad Templates

sink

audio/x-raw:
         format: S16LE
         layout: interleaved
           rate: 48000
       channels: [ 1, 8 ]
audio/x-raw:
         format: S16LE
         layout: interleaved
           rate: { (int)8000, (int)12000, (int)16000, (int)24000 }
       channels: [ 1, 8 ]

Presencealways

Directionsink

Object typeGstPad


src

audio/x-opus:

Presencealways

Directionsrc

Object typeGstPad


Properties

audio-type

“audio-type” GstOpusEncAudioType *

What type of audio to optimize for

Flags : Read / Write

Default value : generic (2049)


bandwidth

“bandwidth” GstOpusEncBandwidth *

Audio Band Width

Flags : Read / Write

Default value : fullband (1105)


bitrate

“bitrate” gint

Specify an encoding bit-rate (in bps).

Flags : Read / Write

Default value : 64000


bitrate-type

“bitrate-type” GstOpusEncBitrateType *

Bitrate type

Flags : Read / Write

Default value : cbr (0)


complexity

“complexity” gint

Complexity

Flags : Read / Write

Default value : 10


dtx

“dtx” gboolean

DTX

Flags : Read / Write

Default value : false


frame-size

“frame-size” GstOpusEncFrameSize *

The duration of an audio frame, in ms

Flags : Read / Write

Default value : 20 (20)


hard-resync

“hard-resync” gboolean

Perform clipping and sample flushing upon discontinuity

Flags : Read / Write

Default value : false


inband-fec

“inband-fec” gboolean

Enable forward error correction

Flags : Read / Write

Default value : false


mark-granule

“mark-granule” gboolean

Apply granule semantics to buffer metadata (implies perfect-timestamp)

Flags : Read

Default value : false


max-payload-size

“max-payload-size” guint

Maximum payload size in bytes

Flags : Read / Write

Default value : 4000


packet-loss-percentage

“packet-loss-percentage” gint

Packet loss percentage

Flags : Read / Write

Default value : 0


perfect-timestamp

“perfect-timestamp” gboolean

Favour perfect timestamps over tracking upstream timestamps

Flags : Read / Write

Default value : false


tolerance

“tolerance” gint64

Consider discontinuity if timestamp jitter/imperfection exceeds tolerance (ns)

Flags : Read / Write

Default value : 40000000


Named constants

GstOpusEncAudioType

Members

generic (2049) – Generic audio
voice (2048) – Voice
restricted-lowdelay (2051) – Restricted low delay

GstOpusEncBandwidth

Members

narrowband (1101) – Narrow band
mediumband (1102) – Medium band
wideband (1103) – Wide band
superwideband (1104) – Super wide band
fullband (1105) – Full band
auto (-1000) – Auto

GstOpusEncBitrateType

Members

cbr (0) – CBR
vbr (1) – VBR
constrained-vbr (2) – Constrained VBR

GstOpusEncFrameSize

Members

2.5 (2) – 2.5
5 (5) – 5
10 (10) – 10
20 (20) – 20
40 (40) – 40
60 (60) – 60

The results of the search are