AW: Copying extract from video file
Thornton, Keith
keith.thornton at zeiss.com
Mon Feb 15 07:33:53 UTC 2016
I would have thought you can achieve this bei sending a seek event down the pipeline with the start time and the stop time in it. Afterwards follow this with an EOS event.
If you don't send EOS down your pipeline, the MOV data will not be written to the end of the file and it will not be playable. Inject an EOS into the pipeline before the mp4mux and when it arrives at the filesink you can change the state of your pipeline.
-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Andy Robinson
Gesendet: Freitag, 12. Februar 2016 17:43
An: gstreamer-devel
Betreff: Copying extract from video file
Hello, I want to copy a short extract from within a large video file to a new smaller video file (I'm not worrying about the audio for now).
GST 1.2.4
I have a pipeline something like this:
filesource ! decodebin ! videoconvert ! x264enc ! mp4mux ! filesink and it works fine as long as I am copying the whole file.
For copying an extract I thought I would seek to the start of the part I want, with:
gst_element_seek_simple(pipeline...)
then while playing keep a close eye on where we are up to with
gst_element_query_position(pipeline...)
and stop playing when we have reached the right point, with
gst_element_set_state(pipeline, GST_STATE_READY);
But this doesn't work, either for starting or stopping.
If I do the seek to the start point, then play to the end; or if I play from the start but use GST_STATE_READY to stop; then in both cases I get a file of plausible size, but Parole Media Player says the file has no playable streams.
I'm wondering if I'm going about this in completely the wrong way. I tried putting a valve after decodebin but if I start with drop=TRUE then I cannot pause the pipeline. I've looked through the list of available plugins but I can't find anything that looks likely.
There's probably an easy way of doing this, it seems a very simple task.
Help please!
Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com _______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list