query_duration

Florian Ludwig dino at phidev.org
Sun Jul 10 08:48:01 PDT 2011


For the record:

Found a working example:

http://www.google.com/codesearch#cc98aI19-Hc/trunk/Main/GStreamer/Source/gst-python/examples/play.py&ct=rc&cd=3&q=query_duration%20lang:python

I am not yet sure what the difference is that makes this example work
though.

Florian

On Sat, 2011-07-09 at 22:08 +0200, Florian Ludwig wrote:
> 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
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-- 
Florian Ludwig <dino at phidev.org>



More information about the gstreamer-devel mailing list