element to cut segments
sergei.vorobyov at facilitylabs.com
Mon Mar 26 07:56:19 PDT 2012
I wonder what would be the canonical/idiomatic way of cutting a
segment from a video stream, from the command line?
There should certainly be a "filter" element, similar to
gnlfilesource, which takes location, start, duration, media-start,
media-duration as parameters and cuts off a segment.
Trouble is gnlfilesource reads from the *file*, and not the result
(pipe) of the preceding modules (which may be arbitrarily
An apparent candidate (video)segmentclip seems to be undocumented.
Sure, I can do seeks in the code and mimic segments myself by using,
e.g., (to cut a segment from sec 2 to sec 5)
event = gst_event_new_seek (1.0,
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SEGMENT,
GST_SEEK_TYPE_SET, 2 * GST_SECOND,
GST_SEEK_TYPE_SET, 5 * GST_SECOND);
if (msg_type & GST_MESSAGE_SEGMENT_DONE) ...
in the callback associated to the main loop.
But there should be a simpler way one could use from the command line
In general, I feel a lack of basic idiomatic descriptions for basic
GStreamer tasks. Documentation is sparse on examples, and Googling
isn't very efficient. Howtos and cheatsheets would be very helpful.
Can anyone share their favorite links? This would be a nice addition
to the GS docs web site. Thanks!
More information about the gstreamer-devel