[gst-devel] Video segment to file
Peter Schwenke
peters at codian.com
Tue Apr 8 10:52:58 CEST 2008
I've managed to put together the following pipeline
gst-launch-0.10 ffmux_flv name=muxer ! filesink location=/tmp/z.flv
filesrc location=../../testMovies/gb_3XUtwjvk.ogg ! oggdemux
name=demuxer demuxer. ! queue ! vorbisdec ! audioconvert ! lame ! muxer.
demuxer. ! queue ! theoradec ! ffmpegcolorspace ! ffenc_flv ! muxer.
in a python program but haven't got the seeking correct.
I have the above implemented with a bin for each of
ffmux_flv name=muxer ! filesink location=/tmp/z.flv
queue ! vorbisdec ! audioconvert ! lame
queue ! theoradec ! ffmpegcolorspace ! ffenc_flv
and
filesrc location=../../testMovies/gb_3XUtwjvk.ogg ! oggdemux
in the main pipeline. All the links are correct. If I run the program
without any seeks it works,
I am using
pipeline.seek(1.0, gst.Format(gst.FORMAT_TIME), gst.SEEK_FLAG_FLUSH,
gst.SEEK_TYPE_SET, start_time_nanoseconds, stop_seek_type,
stop_time_nanoseconds)
The parameters I am setting there are correct because I use the same
thing in other programs.
It seems like a timing problem - like I'm not in the correct state.
I've tried doing the seek when I receive the first async-done message on
the bus.
The only way I get something is if I set the state to STATE_PLAYING and do
gobject.timeout_add(200, self.cb_set_position, self.seek)
Then I get the first couple of seconds from the file, the part of the
result of the seek and then blank.
Of course, I would like to have the state set to STATE_PAUSED and then
do the seek. Then after the seek set the state to STATE_PLAYING. But
then I just get rubbish in the output file.
Does anyone have any suggestions on how I should approach this.
Thanks
...Peter
More information about the gstreamer-devel
mailing list