Help with gstreamer for python needed

Ben Wong at
Sat May 30 06:12:07 CEST 2009

Does gstreamer lock up when you use it from the command line?

Here's a little shell script that will call gstreamer to play any
media file.  (This probably needn't to be said for something so
trivial, but this code has no copyright).  You can use it like so:

  playbin  foo.ogg  barf.mp3  /usr/local/share/music/Artists/Freezepop/*



# Simplistic gstreamer front-end.
# Ben Wong,  May 2009
# Public Domain

# Usage:  playbin [ file ... ]
# E.g.,  cd /usr/share/sounds; playbin *

# When the user hits ^C, wait a bit and then continue to next song.
inthandler () {
  trap reallyexit INT
  echo "Skipping song. Hit ^C twice to quit."
  sleep 1 || reallyexit       # GNU sleep fails on SIGINT
  trap inthandler INT

# If the user hits ^C while we're already in the INT handler, quit.
reallyexit () {
  exit 1

#### Main routine

trap inthandler INT

for f; do

  case "$f" in
    /*) # do nothing
    *) f="`pwd`/$f"

  echo gst-launch playbin '"'uri=file://$f'"' >&2
  gst-launch playbin "uri=file://$f"


# End of script

On Mon, May 25, 2009 at 10:43 AM, Andreas Hennig
<andreas.hennig.dd1 at> wrote:
> Hi All!
> Does one of you have expirience with gstreamer?
> I use gstreamer for my music player pyRok. Initialy it works fine but after a while it locks up and i don't see a reason.
> There is no error message ot something. The music just stops.
> I compared pyRok with pythm but i cant see any difference regarding gstreamer.
> PyRok  uses pygame as UI. Maybe pygame interfeares with gstreamer somehow...
> Maybe somebody have an idea...
> rgds
> Andreas
> _______________________________________________
> Openmoko community mailing list
> community at

More information about the community mailing list