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

Implemented interfaces

Factory details

Authors: – Vincent Penquerc'h

Classification:Codec/Encoder/Audio

Rank – primary

Plugin – opus

Package – GStreamer Base Plug-ins

Pad Templates

sink

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

Presencealways

Directionsink

Object typeGstPad


src

audio/x-opus:

Presencealways

Directionsrc

Object typeGstPad


Properties

audio-type

“audio-type” Opus-enc-audio-type *

What type of audio to optimize for

Flags : Read / Write

Default value : generic (2049)


bandwidth

“bandwidth” Opus-enc-bandwidth *

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” Opus-enc-bitrate-type *

Bitrate type

Flags : Read / Write

Default value : constrained-vbr (2)


complexity

“complexity” gint

Complexity

Flags : Read / Write

Default value : 10


dtx

“dtx” gboolean

DTX

Flags : Read / Write

Default value : false


frame-size

“frame-size” Opus-enc-frame-size *

The duration of an audio frame, in ms

Flags : Read / Write

Default value : 20 (20)


inband-fec

“inband-fec” gboolean

Enable in-band forward error correction (use in combination with the packet-loss-percentage property)

Flags : Read / Write

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


Named constants

Opus-enc-audio-type

Members

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

Opus-enc-bandwidth

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

Opus-enc-bitrate-type

Members

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

Opus-enc-frame-size

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