multifilesrc

multifilesrc — Read a sequentially named set of files into buffers

Synopsis

struct              GstMultiFileSrc;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstBaseSrc
                           +----GstPushSrc
                                 +----GstMultiFileSrc

Properties

  "caps"                     GstCaps*              : Read / Write
  "index"                    gint                  : Read / Write
  "location"                 gchar*                : Read / Write
  "loop"                     gboolean              : Read / Write
  "start-index"              gint                  : Read / Write
  "stop-index"               gint                  : Read / Write

Description

Reads buffers from sequentially named files. If used together with an image decoder, one needs to use the "caps" property or a capsfilter to force to caps containing a framerate. Otherwise image decoders send EOS after the first picture. We also need a videorate element to set timestamps on all buffers after the first one in accordance with the framerate.

File names are created by replacing "%d" with the index using printf().

Example launch line

1
2
3
gst-launch-1.0 multifilesrc location="img.%04d.png" index=0 caps="image/png,framerate=\(fraction\)12/1" ! \
    pngdec ! videoconvert ! videorate ! theoraenc ! oggmux ! \
    filesink location="images.ogg"
This pipeline creates a video file "images.ogg" by joining multiple PNG files named img.0000.png, img.0001.png, etc.

Synopsis

Element Information

plugin

multifile

author

David Schleef <ds@schleef.org>

class

Source/File

Element Pads

name

src

direction

source

presence

always

details

ANY

Details

struct GstMultiFileSrc

struct GstMultiFileSrc;

Property Details

The "caps" property

  "caps"                     GstCaps*              : Read / Write

Caps describing the format of the data.


The "index" property

  "index"                    gint                  : Read / Write

Index to use with location property to create file names. The index is incremented by one for each buffer read.

Allowed values: >= 0

Default value: 0


The "location" property

  "location"                 gchar*                : Read / Write

Pattern to create file names of input files. File names are created by calling sprintf() with the pattern and the current index.

Default value: "%05d"


The "loop" property

  "loop"                     gboolean              : Read / Write

Whether to repeat from the beginning when all files have been read.

Default value: FALSE


The "start-index" property

  "start-index"              gint                  : Read / Write

Start value of index. The initial value of index can be set either by setting index or start-index. When the end of the loop is reached, the index will be set to the value start-index.

Allowed values: >= 0

Default value: 0


The "stop-index" property

  "stop-index"               gint                  : Read / Write

Stop value of index. The special value -1 means no stop.

Allowed values: >= G_MAXULONG

Default value: 0

See Also

GstFileSrc