[gst-devel] Seeking to certain file position

Martin Soto soto at informatik.uni-kl.de
Fri Mar 9 17:09:44 CET 2007


Hello everyone:

Is there a reliable way to make a pipeline seek to a specific file
position? I'm trying to do something like playing the segment between
byte positions 100.000 and 200.000 of a certain MP3 or OGG/Vorbis file. 

The problem I have now is that when I specify byte positions
(GST_FORMAT_BYTE) in a seek operation sent to the pipeline, it seems to
interpret the positions with respect to the already decoded sound
material (at least, this happens with OGG/Vorbis) and not the original
file (I think this because I hear a much shorter segment which belongs
much earlier in the file). I also tried sending the seek event directly
to the filesrc element. This seems to get the right file segment, but
then there are sync problems (there's a silence gap before it starts
playing something and I cannot loop back to the beginning, as if no or
invalid newsegment events were being sent.)

Any help will be appreciated.

Have fun,

M. S.





More information about the gstreamer-devel mailing list