PDA

View Full Version : Phonon won't play audio file



kar
27th October 2010, 20:53
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.

wysota
27th October 2010, 22:00
You are missing some gstreamer plugins.

skepticalgeek
27th October 2010, 23:25
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.

kar
28th October 2010, 01:35
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?

wysota
28th October 2010, 01:39
"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.

kar
29th October 2010, 02:41
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. :)