mplex

mplex

Properties

gint bufsize Read / Write
GstMplexFormat format Read / Write
gint mux-bitrate Read / Write
gint packets-per-pack Read / Write
gint sector-size Read / Write
gboolean system-headers Read / Write
gboolean vbr Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstMplex

Description

This element is an audio/video multiplexer for MPEG-1/2 video streams and (un)compressed audio streams such as AC3, MPEG layer I/II/III. It is based on the mjpegtools library. Documentation on creating MPEG videos in general can be found in the

MJPEG Howto

and the man-page of the mplex tool documents the properties of this element, which are shared with the mplex tool.

Example pipeline

1
gst-launch-1.0 -v videotestsrc num-buffers=1000 ! mpeg2enc ! mplex ! filesink location=videotestsrc.mpg
This example pipeline will encode a test video source to an MPEG1 elementary stream and multiplexes this to an MPEG system stream.

If several streams are being multiplexed, there should (as usual) be a queue in each stream, and due to mplex' buffering the capacities of these may have to be set to a few times the default settings to prevent the pipeline stalling.

Synopsis

Element Information

plugin

mplex

author

Andrew Stevens <andrew.stevens@nexgo.de> Ronald Bultje <rbultje@ronald.bitfreak.net> Mark Nauwelaerts <mnauw@users.sourceforge.net>

class

Codec/Muxer

Element Pads

name

audio_%u

direction

sink

presence

request

details

audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], channels=(int)[ 1, 8 ], rate=(int)[ 8000, 96000 ]

audio/x-ac3, channels=(int)[ 1, 8 ], rate=(int)[ 8000, 96000 ]

audio/x-dts

audio/x-raw, format=(string){ S16BE, S20BE, S24BE }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 6 ]

name

video_%u

direction

sink

presence

request

details

video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name

src

direction

source

presence

always

details

video/mpeg, systemstream=(boolean)true

Functions

Types and Values

GstMplex

typedef struct _GstMplex GstMplex;

Property Details

The “bufsize” property

  “bufsize”                  gint

Target decoders video buffer size (kB) [default determined by format if not explicitly set].

Flags: Read / Write

Allowed values: [20,4000]

Default value: 46


The “format” property

  “format”                   GstMplexFormat

Encoding profile format.

Flags: Read / Write

Default value: DVD MPEG-2


The “mux-bitrate” property

  “mux-bitrate”              gint

Bitrate of output stream in kbps (0 = autodetect).

Flags: Read / Write

Allowed values: [0,15360]

Default value: 0


The “packets-per-pack” property

  “packets-per-pack”         gint

Number of packets per pack for generic formats.

Flags: Read / Write

Allowed values: [1,100]

Default value: 1


The “sector-size” property

  “sector-size”              gint

Specify sector size in bytes for generic formats.

Flags: Read / Write

Allowed values: [256,16384]

Default value: 2048


The “system-headers” property

  “system-headers”           gboolean

Create system header in every pack for generic formats.

Flags: Read / Write

Default value: FALSE


The “vbr” property

  “vbr”                      gboolean

Whether the input video stream is variable bitrate.

Flags: Read / Write

Default value: FALSE

See Also

mpeg2enc