# asfmux

Muxes media into an ASF file/stream.

Pad names are either video_xx or audio_xx, where 'xx' is the stream number of the stream that goes through that pad. Stream numbers are assigned sequentially, starting from 1.

## Example launch lines

(write everything in one line, without the backslash characters)

     gst-launch-1.0 videotestsrc num-buffers=250 \
     ! "video/x-raw,format=(string)I420,framerate=(fraction)25/1" ! avenc_wmv2 \
     ! asfmux name=mux ! filesink location=test.asf \
     audiotestsrc num-buffers=440 ! audioconvert \
     ! "audio/x-raw,rate=44100" ! avenc_wmav2 ! mux.

This creates an ASF file containing an WMV video stream with a test picture and WMA audio stream of a test sound.

## Live streaming

asfmux and rtpasfpay are capable of generating a live asf stream. asfmux has to set its 'streamable' property to true, because in this mode it won't try to seek back to the start of the file to replace some fields that couldn't be known at the file start. In this mode, it won't also send indexes at the end of the data packets (the actual media content) the following pipelines are an example of this usage. (write everything in one line, without the backslash characters) Server (sender)

     gst-launch-1.0 -ve videotestsrc ! avenc_wmv2 ! asfmux name=mux streamable=true \
     ! rtpasfpay ! udpsink host=127.0.0.1 port=3333 \
     audiotestsrc ! avenc_wmav2 ! mux.

Client (receiver)

     gst-launch-1.0 udpsrc port=3333 ! "caps_from_rtpasfpay_at_sender" \
     ! rtpasfdepay ! decodebin name=d ! queue \
     ! videoconvert ! autovideosink \
     d. ! queue ! audioconvert ! autoaudiosink

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──asfmux

## Implemented interfaces

    GstTagSetter

## Factory details

Authors: – Thiago Santos <thiagoss@embedded.ufcg.edu.br></thiagoss@embedded.ufcg.edu.br>

Classification: – `Codec/Muxer`

Rank – primary

Plugin – asfmux

Package – GStreamer Bad Plug-ins

## Pad Templates

### `audio_%u`

    audio/x-wma:
         wmaversion: [ 1, 3 ]
    audio/mpeg:
              layer: 3
        mpegversion: 1
           channels: [ 1, 2 ]
               rate: [ 8000, 96000 ]

Presence – request

Direction – sink

Object type – GstPad

### `src`

    video/x-ms-asf:
             parsed: true

Presence – always

Direction – src

Object type – GstPad

### `video_%u`

    video/x-wmv:
         wmvversion: [ 1, 3 ]

Presence – request

Direction – sink

Object type – GstPad

## Properties

### merge-stream-tags

    “merge-stream-tags” gboolean

If the stream metadata (received as events in the sink) should be merged to the main file metadata.

Flags : Read / Write / Construct

Default value : true

### packet-size

    “packet-size” guint

The ASF packets size (bytes)

Flags : Read / Write / Construct

Default value : 4800

### padding

    “padding” guint64

Size of the padding object to be added to the end of the header. If this less than 24 (the smaller size of an ASF object), no padding is added.

Flags : Read / Write / Construct

Default value : 0

### preroll

    “preroll” guint64

The preroll time (milliseconds)

Flags : Read / Write / Construct

Default value : 5000

### 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 / Construct

Default value : false

The results of the search are