vorbisenc

vorbisenc — Encodes audio in Vorbis format

Synopsis

                    GstVorbisEnc;

Properties

  "bitrate"                  gint                  : Read / Write
  "last-message"             gchar*                : Read
  "managed"                  gboolean              : Read / Write
  "max-bitrate"              gint                  : Read / Write
  "min-bitrate"              gint                  : Read / Write
  "quality"                  gfloat                : Read / Write

Description

This element encodes raw float audio into a Vorbis stream. Vorbis is a royalty-free audio codec maintained by the Xiph.org Foundation.

Example pipelines

1
gst-launch -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! vorbisenc ! oggmux ! filesink location=sine.ogg
Encode a test sine signal to Ogg/Vorbis. Note that the resulting file will be really small because a sine signal compresses very well.
1
gst-launch -v alsasrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg
Record from a sound card using ALSA and encode to Ogg/Vorbis.

Last reviewed on 2006-03-01 (0.10.4)

Details

GstVorbisEnc

typedef struct {
  GstElement       element;

  GstPad          *sinkpad;
  GstPad          *srcpad;

  GstCaps         *srccaps;
  GstCaps         *sinkcaps;

  vorbis_info      vi; /* struct that stores all the static vorbis bitstream
                                                            settings */
  vorbis_comment   vc; /* struct that stores all the user comments */

  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
  vorbis_block     vb; /* local working space for packet->PCM decode */

  gboolean         managed;
  gint             bitrate;
  gint             min_bitrate;
  gint             max_bitrate;
  gfloat           quality;
  gboolean         quality_set;

  gint             channels;
  gint             frequency;

  guint64          samples_in;
  guint64          bytes_out;
  GstClockTime     next_ts;
  GstClockTime     expected_ts;
  gboolean         next_discont;
  guint64          granulepos_offset;
  gint64           subgranule_offset;
  GstSegment       segment;
  GstClockTime     initial_ts;

  GstTagList *     tags;

  gboolean         setup;
  gboolean         header_sent;
  gchar           *last_message;
} GstVorbisEnc;

Opaque data structure.

Property Details

The "bitrate" property

  "bitrate"                  gint                  : Read / Write

Attempt to encode at a bitrate averaging this (in bps). This uses the bitrate management engine, and is not recommended for most users. Quality is a better alternative. (-1 == disabled).

Allowed values: [G_MAXULONG,250001]

Default value: -1


The "last-message" property

  "last-message"             gchar*                : Read

The last status message.

Default value: NULL


The "managed" property

  "managed"                  gboolean              : Read / Write

Enable bitrate management engine.

Default value: FALSE


The "max-bitrate" property

  "max-bitrate"              gint                  : Read / Write

Specify a maximum bitrate (in bps). Useful for streaming applications. (-1 == disabled).

Allowed values: [G_MAXULONG,250001]

Default value: -1


The "min-bitrate" property

  "min-bitrate"              gint                  : Read / Write

Specify a minimum bitrate (in bps). Useful for encoding for a fixed-size channel. (-1 == disabled).

Allowed values: [G_MAXULONG,250001]

Default value: -1


The "quality" property

  "quality"                  gfloat                : Read / Write

Specify quality instead of specifying a particular bitrate.

Allowed values: [-0.1,1]

Default value: 0.3

See Also

vorbisdec, oggmux