query_duration
Florian Ludwig
dino at phidev.org
Sat Jul 9 13:08:35 PDT 2011
Hi,
I'm trying to get the length of some music file's using gstreamer and
python. I'm using playbin2 and to get started I just copied the example
code from:
http://pygstdocs.berlios.de/pygst-tutorial/playbin.html
and added
print 'duration', self.player.query_duration()
but that results in an exception:
Traceback (most recent call last):
File "play_length.py", line 39, in start_stop
print 'duration', self.player.query_duration()
gst.QueryError: query failed
How do I correctly get the play length of files?
Full code attached.
Thanks,
Florian
--
Florian Ludwig <dino at phidev.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: play_length.py
Type: text/x-python
Size: 1623 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110709/3ffc6f9b/attachment.py>
More information about the gstreamer-devel
mailing list