opusenc

opusenc — Encodes audio in Opus format

Properties

gboolean audio Read / Write
GstOpusEncBandwidth bandwidth Read / Write
gint bitrate Read / Write
gboolean cbr Read / Write
gint complexity Read / Write
gboolean constrained-vbr Read / Write
gboolean dtx Read / Write
GstOpusEncFrameSize frame-size Read / Write
gboolean inband-fec Read / Write
guint max-payload-size Read / Write
gint packet-loss-percentage Read / Write
GstOpusEncAudioType audio-type Read / Write
GstOpusEncBitrateType bitrate-type Read / Write

Types and Values

struct GstOpusEnc

Description

Synopsis

Element Information

plugin

opus

author

Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>

class

Codec/Encoder/Audio

Element Pads

name

sink

direction

sink

presence

always

details

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

name

src

direction

source

presence

always

details

audio/x-opus

Functions

Types and Values

struct GstOpusEnc

struct GstOpusEnc {
  GstAudioEncoder       element;

  OpusMSEncoder        *state;

  /* Locks those properties which may be changed at play time */
  GMutex                property_lock;

  /* properties */
  gint                  audio_type;
  gint                  bitrate;
  gint                  bandwidth;
  gint                  frame_size;
  GstOpusEncBitrateType bitrate_type;
  gint                  complexity;
  gboolean              inband_fec;
  gboolean              dtx;
  gint                  packet_loss_percentage;
  guint                 max_payload_size;

  gint                  frame_samples;
  gint                  n_channels;
  gint                  sample_rate;

  guint64               encoded_samples;

  guint8                channel_mapping_family;
  guint8                encoding_channel_mapping[256];
  guint8                decoding_channel_mapping[256];
  guint8                n_stereo_streams;
};

Property Details

The “audio” property

  “audio”                    gboolean

Audio or voice (obsolete, use audio-type).

Flags: Read / Write

Default value: TRUE


The “bandwidth” property

  “bandwidth”                GstOpusEncBandwidth

Audio Band Width.

Flags: Read / Write

Default value: Full band


The “bitrate” property

  “bitrate”                  gint

Specify an encoding bit-rate (in bps).

Flags: Read / Write

Allowed values: [4000,650000]

Default value: 64000


The “cbr” property

  “cbr”                      gboolean

Constant bit rate.

Flags: Read / Write

Default value: TRUE


The “complexity” property

  “complexity”               gint

Complexity.

Flags: Read / Write

Allowed values: [0,10]

Default value: 10


The “constrained-vbr” property

  “constrained-vbr”          gboolean

Constrained VBR.

Flags: Read / Write

Default value: TRUE


The “dtx” property

  “dtx”                      gboolean

DTX.

Flags: Read / Write

Default value: FALSE


The “frame-size” property

  “frame-size”               GstOpusEncFrameSize

The duration of an audio frame, in ms.

Flags: Read / Write

Default value: 20


The “inband-fec” property

  “inband-fec”               gboolean

Enable forward error correction.

Flags: Read / Write

Default value: FALSE


The “max-payload-size” property

  “max-payload-size”         guint

Maximum payload size in bytes.

Flags: Read / Write

Allowed values: [2,4000]

Default value: 4000


The “packet-loss-percentage” property

  “packet-loss-percentage”   gint

Packet loss percentage.

Flags: Read / Write

Allowed values: [0,100]

Default value: 0


The “audio-type” property

  “audio-type”               GstOpusEncAudioType

What type of audio to optimize for.

Flags: Read / Write

Default value: Generic audio


The “bitrate-type” property

  “bitrate-type”             GstOpusEncBitrateType

Bitrate type.

Flags: Read / Write

Default value: CBR