![]() |
![]() |
![]() |
GStreamer Good Plugins 1.0 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBin +----GstSplitMuxSink
"location" gchar* : Read / Write "max-size-bytes" guint64 : Read / Write "max-size-time" guint64 : Read / Write "mux-overhead" gdouble : Read / Write "muxer" GstElement* : Read / Write "sink" GstElement* : Read / Write "max-files" guint : Read / Write "send-keyframe-requests" gboolean : Read / Write
This element wraps a muxer and a sink, and starts a new file when the mux contents are about to cross a threshold of maximum size of maximum time, splitting at video keyframe boundaries. Exactly one input video stream can be muxed, with as many accompanying audio and subtitle streams as desired.
By default, it uses mp4mux and filesink, but they can be changed via the 'muxer' and 'sink' properties.
The minimum file size is 1 GOP, however - so limits may be overrun if the distance between any 2 keyframes is larger than the limits.
If a video stream is available, the splitting process is driven by the video stream contents, and the video stream must contain closed GOPs for the output file parts to be played individually correctly. In the absence of a video stream, the first available stream is used as reference for synchronization.
1 |
gst-launch-1.0 -e v4l2src num-buffers=500 ! video/x-raw,width=320,height=240 ! videoconvert ! queue ! timeoverlay ! x264enc key-int-max=10 ! h264parse ! splitmuxsink location=video%02d.mov max-size-time=10000000000 max-size-bytes=1000000 |
plugin |
multifile |
author |
Jan Schmidt <jan@centricular.com> |
class |
Generic/Bin/Muxer |
"location"
property "location" gchar* : Read / Write
Format string pattern for the location of the files to write (e.g. video%05d.mp4).
Default value: NULL
"max-size-bytes"
property "max-size-bytes" guint64 : Read / Write
Max. amount of data per file (in bytes, 0=disable).
Default value: 0
"max-size-time"
property "max-size-time" guint64 : Read / Write
Max. amount of time per file (in ns, 0=disable).
Default value: 0
"mux-overhead"
property "mux-overhead" gdouble : Read / Write
Extra size overhead of muxing (0.02 = 2%).
Allowed values: [0,1]
Default value: 0.02
"muxer"
property "muxer" GstElement* : Read / Write
The muxer element to use (NULL = default mp4mux).
"sink"
property "sink" GstElement* : Read / Write
The sink element (or element chain) to use (NULL = default filesink).
"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
"format-location"
signalgchar* user_function (GstSplitMuxSink *splitmux,
guint fragment_id,
gpointer user_data) : Run Last
|
the GstSplitMuxSink |
|
the sequence number of the file to be created |
|
user data set when the signal handler was connected. |
Returns : |
the location to be used for the next output file |