# matroskamux

matroskamux muxes different input streams into a Matroska file.

## Example launch line

     gst-launch-1.0 -v filesrc location=/path/to/mp3 ! mpegaudioparse ! matroskamux name=mux ! filesink location=test.mkv  filesrc location=/path/to/theora.ogg ! oggdemux ! theoraparse ! mux.

This pipeline muxes an MP3 file and a Ogg Theora video into a Matroska file.

     gst-launch-1.0 -v audiotestsrc num-buffers=100 ! audioconvert ! vorbisenc ! matroskamux ! filesink location=test.mka

This pipeline muxes a 440Hz sine wave encoded with the Vorbis codec into a Matroska file.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstAggregator
                        ╰──GstMatroskaMux

## Implemented interfaces

    GstTagSetter
    GstTocSetter

## Factory details

Authors: – GStreamer maintainers <gstreamer-devel@lists.freedesktop.org></gstreamer-devel@lists.freedesktop.org>

Classification: – `Codec/Muxer`

Rank – primary

Plugin – matroska

Package – GStreamer Good Plug-ins

## Pad Templates

### `audio_%u`

    audio/mpeg:
        mpegversion: 1
              layer: [ 1, 3 ]
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/mpeg:
        mpegversion: { (int)2, (int)4 }
      stream-format: raw
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-ac3:
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-eac3:
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-dts:
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-vorbis:
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-flac:
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-opus:
           channels: [ 1, 8 ]
               rate: { (int)8000, (int)16000, (int)24000, (int)32000, (int)48000 }
    audio/x-speex:
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-raw:
             format: { U8, S16BE, S16LE, S24BE, S24LE, S32BE, S32LE, F32LE, F64LE }
             layout: interleaved
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-tta:
              width: { (int)8, (int)16, (int)24 }
           channels: { (int)1, (int)2 }
               rate: [ 8000, 96000 ]
    audio/x-pn-realaudio:
          raversion: { (int)1, (int)2, (int)8 }
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-wma:
         wmaversion: [ 1, 3 ]
        block_align: [ 0, 65535 ]
            bitrate: [ 0, 524288 ]
           channels: [ 1, 2147483647 ]
               rate: [ 1, 2147483647 ]
    audio/x-alaw:
           channels: { (int)1, (int)2 }
               rate: [ 8000, 192000 ]
    audio/x-mulaw:
           channels: { (int)1, (int)2 }
               rate: [ 8000, 192000 ]
    audio/x-adpcm:
             layout: dvi
        block_align: [ 64, 8192 ]
           channels: { (int)1, (int)2 }
               rate: [ 8000, 96000 ]
    audio/G722:
           channels: 1
               rate: 16000
    audio/x-adpcm:
             layout: g726
           channels: 1
               rate: 8000

Presence – request

Direction – sink

Object type – GstMatroskaMuxPad

### `src`

    video/x-matroska:
    video/x-matroska-3d:
    audio/x-matroska:

Presence – always

Direction – src

Object type – GstPad

### `subtitle_%u`

    subtitle/x-kate:
    text/x-raw:
             format: utf8
    application/x-ssa:
    application/x-ass:
    application/x-usf:
    subpicture/x-dvd:
    application/x-subtitle-unknown:

Presence – request

Direction – sink

Object type – GstMatroskaMuxPad

### `video_%u`

    video/mpeg:
        mpegversion: { (int)1, (int)2, (int)4 }
       systemstream: false
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-h264:
      stream-format: { (string)avc, (string)avc3 }
          alignment: au
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-h265:
      stream-format: { (string)hvc1, (string)hev1 }
          alignment: au
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-h266:
      stream-format: { (string)vvc1, (string)vvi1 }
          alignment: au
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-divx:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-huffyuv:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-dv:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-h263:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-msmpeg:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    image/jpeg:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-theora:
    video/x-dirac:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-pn-realvideo:
          rmversion: [ 1, 4 ]
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-vp8:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-vp9:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-raw:
             format: { YUY2, I420, YV12, UYVY, AYUV, GRAY8, GRAY10_LE32, GRAY16_LE, BGR, RGB, RGBA64_LE, BGRA64_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-prores:
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-wmv:
         wmvversion: [ 1, 3 ]
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-av1:
      stream-format: obu-stream
          alignment: tu
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
    video/x-ffv:
          ffversion: 1
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]

Presence – request

Direction – sink

Object type – GstMatroskaMuxPad

## Properties

### cluster-timestamp-offset

    “cluster-timestamp-offset” guint64

An offset to add to all clusters/blocks (in nanoseconds)

Flags : Read / Write

Default value : 0

Since : 1.20

### creation-time

    “creation-time” GDateTime *

Date and time of creation. This will be used for the DateUTC field. NULL means that the current time will be used.

Flags : Read / Write

### max-cluster-duration

    “max-cluster-duration” gint64

A new cluster will be created if its duration exceeds this value. 0 means no maximum duration.

Flags : Read / Write

Default value : 65535000000

### min-cluster-duration

    “min-cluster-duration” gint64

Desired cluster duration as nanoseconds. A new cluster will be created irrespective of this property if a force key unit event is received. 0 means create a new cluster for each video keyframe or for each audio buffer in audio only streams.

Flags : Read / Write

Default value : 500000000

### min-index-interval

    “min-index-interval” gint64

An index entry is created every so many nanoseconds.

Flags : Read / Write

Default value : 0

### offset-to-zero

    “offset-to-zero” gboolean

Offsets all streams so that the earliest stream starts at 0.

Flags : Read / Write

Default value : false

### streamable

    “streamable” gboolean

If set to true, the output should be as if it is to be streamed and hence no indexes written or duration written.

Flags : Read / Write

Default value : false

### timecodescale

    “timecodescale” gint64

TimecodeScale used to calculate the Raw Timecode of a Block

Flags : Read / Write

Default value : 1000000

### version

    “version” gint

This parameter determines what Matroska features can be used.

Flags : Read / Write

Default value : 2

### writing-app

    “writing-app” gchararray

The name the application that creates the matroska file.

Flags : Read / Write

Default value : GStreamer Matroska muxer

The results of the search are