![]() |
![]() |
![]() |
GStreamer Good Plugins 1.0 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseSink +----GstMultiFileSink
"location" gchar* : Read / Write "index" gint : Read / Write "next-file" GstMultiFileSinkNext : Read / Write "post-messages" gboolean : Read / Write "max-files" guint : Read / Write "max-file-size" guint64 : Read / Write "aggregate-gops" gboolean : Read / Write "max-file-duration" guint64 : Read / Write
Write incoming data to a series of sequentially-named files.
This element is usually used with data where each buffer is an independent unit of data in its own right (e.g. raw video buffers or encoded JPEG or PNG images) or with streamable container formats such as MPEG-TS or MPEG-PS.
It is not possible to use this element to create independently playable mp4 files, use the splitmuxsink element for that instead.
The filename property should contain a string with a %d placeholder that will be substituted with the index for each filename.
If the "post-messages" property is TRUE, it sends an application
message named
"GstMultiFileSink"
after writing each
buffer.
The message's structure contains these fields:
gchar *
"filename"
:
the filename where the buffer was written.
gint
"index"
:
the index of the buffer.
GstClockTime
"timestamp"
:
the timestamp of the buffer.
GstClockTime
"stream-time"
:
the stream time of the buffer.
GstClockTime
"running-time"
:
the running_time of the buffer.
GstClockTime
"duration"
:
the duration of the buffer.
guint64
"offset"
:
the offset of the buffer that triggered the message.
guint64
"offset-end"
:
the offset-end of the buffer that triggered the message.
1 2 |
gst-launch-1.0 audiotestsrc ! multifilesink gst-launch-1.0 videotestsrc ! multifilesink post-messages=true filename="frame%d" |
typedef enum { GST_MULTI_FILE_SINK_NEXT_BUFFER, GST_MULTI_FILE_SINK_NEXT_DISCONT, GST_MULTI_FILE_SINK_NEXT_KEY_FRAME, GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT, GST_MULTI_FILE_SINK_NEXT_MAX_SIZE, GST_MULTI_FILE_SINK_NEXT_MAX_DURATION } GstMultiFileSinkNext;
File splitting modes.
New file for each buffer | |
New file after each discontinuity | |
New file at each key frame (Useful for MPEG-TS segmenting) | |
New file after a force key unit event | |
New file when the configured maximum file size would be exceeded with the next buffer or buffer list | |
New file when the configured maximum duration would be exceeded with the next buffer or buffer list |
"location"
property "location" gchar* : Read / Write
Location of the file to write.
Default value: NULL
"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 written.
Allowed values: >= 0
Default value: 0
"next-file"
property"next-file" GstMultiFileSinkNext : Read / Write
When to start a new file.
Default value: New file for each buffer
"post-messages"
property "post-messages" gboolean : Read / Write
Post a message on the GstBus for each file.
Default value: FALSE
"max-files"
property "max-files" guint : Read / Write
Maximum number of files to keep on disk. Once the maximum is reached, old files start to be deleted to make room for new ones.
Default value: 0
"max-file-size"
property "max-file-size" guint64 : Read / Write
Maximum file size before starting a new file in max-size mode.
Default value: 2147483648
"aggregate-gops"
property "aggregate-gops" gboolean : Read / Write
Whether to aggregate complete GOPs before doing any processing. Set this to TRUE to make sure each new file starts with a keyframe. This requires the upstream element to flag buffers containing key units and delta units correctly. At least the MPEG-PS and MPEG-TS muxers should be doing this.
Default value: FALSE
Since 1.6