Results 1 to 6 of 6

Thread: Phonon won't play audio file

  1. #1
    Join Date
    Oct 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Phonon won't play audio file

    I have written a nice media player using Phonon. It works perfectly on Windows XP SP3 compiled with Qt 4.7. It also compiles under Linux with Qt 4.5.0 (installed from the ubuntu 9.04 repositories), and runs without any errors. However, under Linux it will not actually play any MP3 file. No sound. However, I have the Audacious 1.5.1 media player installed, and it plays MP3 files fine. My Linux system is running Eeebuntu 3.0, which is a version of Ubuntu 9.04 (Gnome) optimized for netbooks. I think I have a problem getting the Phonon-GStreamer backend to work. I have installed the following packages for the backend:
    phonon version 4.4.3.1-0ubuntu3
    phonon-backend-gstreamer version 4.4.3.1-0ubuntu3
    libphonon4 version 4.4.3.1-0ubuntu3
    libphonon-dev4 version 4.4.3.1-0ubuntu3

    Phonon::BackendCapabilities::availableAudioOutputD evices() reports one device as follows:
    name: default
    description: Default audio device
    This seems odd to me. Also, when I run Qt Configuration and go to the Phonon tab, everything is grayed out, and it shows About Phonon, Current Version: Not available, and About GStreamer, Current Version: Not available. And at the bottom of the screen it says Phonon GStreamer backend not available. This seems wrong, and indicates to me that the Phonon GStreamer backend is not working.

    I thought I had installed all the necessary packages to get the Phonon GStreamer backend working. I also have the following GStreamer packages installed:
    gstreamer0.10-plugins-good
    gstreamer0.10-pulseaudio
    gstreamer0.10-alsa
    gstreamer0.10-gnomevfs
    gstreamer0.10-plugins-base
    gstreamer0.10-plugins-base-apps
    gstreamer0.10-schroedinger
    gstreamer0.10-tools
    gstreamer0.10-x
    libgstreamer0.10-0
    libgstreamer-plugins-base0.10-0

    What am I missing here? Any hints on getting Phonon to work with the GStreamer backend would be appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon won't play audio file

    You are missing some gstreamer plugins.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2010
    Posts
    40
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Phonon won't play audio file

    If you haven't done so, install the KDE system settings program. It is superior to what comes with Ubuntu, and has an area in the multimedia section where you can tweak your phonon settings. Also, consider the xine backend. I've found gstreamer to be kind of finicky when it comes to phonon.

  4. #4
    Join Date
    Oct 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon won't play audio file

    Quote Originally Posted by wysota View Post
    You are missing some gstreamer plugins.
    OK. Which one(s)? I kind of figured I was missing something, but the description of the "phonon" package states "This metapackage ensures a working Phonon (libphonon4 and a backend)." It sounded like that would do it for me. So WHAT gstreamer plugin(s) might I be missing?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon won't play audio file

    "Working Phonon" doesn't mean it can play every possible file type. As far as I remember the MP3 decoder is either in the "bad" or "ugly" plugin set. "Good" plugins are only the ones that are open formats.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Oct 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon won't play audio file

    Installed gstreamer-plugins-ugly. Problem solved. Thanks for your help.

    I would have thought that the default phonon gstreamer backend would have supported MP3 files. I know... patent restrictions v.s. open source and all that. But at least the solution was very simple, and you pointed me in the right direction.

Similar Threads

  1. Pan audio stream using Phonon
    By se_tony in forum Newbie
    Replies: 1
    Last Post: 21st September 2010, 20:44
  2. play audio url
    By tungvc in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2010, 11:04
  3. Play video file with Phonon and GStreamer show black screen
    By SimbadSubZero in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2010, 11:47
  4. Which dll is needed to play the audio files
    By addu in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2009, 23:20
  5. Replies: 0
    Last Post: 5th August 2008, 10:54

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.