[gst-devel] Video segment to file

Peter Schwenke peters at codian.com
Wed Apr 2 02:01:05 CEST 2008

I would like to capture a segment of a video file to file e.g. 10
seconds of video to file.  This does not need frame accuracy.

I have managed to do this for an audio file (e.g.. the C  equivalent of
gst-launch filesrc location=... ! oggdemux ! vorbisdec ! audioconvert !
lame ! filesink location=... with a seek thrown in)

I have also managed to do seeks in C programs which used both playbin
and oggdemux.

However, I haven't worked out an approach for video given that I call a
"pad-added" handler (say in the case of using oggdemux) and need to get
the output from both audio and video to the same filesrc.

I have managed to join an audio file and a video file using gst-launch
doing something along the line of (I'll omit oggdemux etc because I'm
really after a generic method for this)

filesrc ! filesrc location=audioFile ! demuxer ! audio decode !
audioconvert ! audio encode ! muxer name=muxer muxer. ! filesink
location=combined filesrc=videoFile ! demuxer ! video decode ! video
convert ! video encode ! muxer.

Does anyone have an idea on how I should approach this?

Also, if no transcoding is required what would be the simplest elements
to use between a filesrc and filesink to perform a seek.

i.e. filesrc location=.... ! queue ! filesink location=...


More information about the gstreamer-devel mailing list