Phonon and mp3-support on embedded device
I have cross compiled qt for an embedded device (the freescale i.mx51 evk) but have difficulty using phonon the way i want.
Phonon works fine when using simple wav-files. But when i try to play mp3-files, no sound. And no error messages either.
I suspect some library or something is missing.
The system is running Linux - Busybox with a vast number of libraries and add-ons.
I can however play mp3 files (and wav as well) using mp3player from the command line.
I know this issue probably is not directly related to qt, but maybe someone can provide some guidance anyway.
Thanks for your time!
You should try playing mp3 files with gstreamer which should be available in your embedded system. If that fails, phonon will also fail playing mp3s.
Use google to find out, search for "gst-launch mp3"
Hello, and thanks for quick reply!
I have installed the following packages to the embedded system.
alsa-utils, alsa-lib, gstreamer, gstreamer-plugins-base, gstreamer-plugins-good
gstreamer-plugins-bad, gstreamer-plugins-ugly, gstreamer-FFmpeg-plugins, libmad.
While running the following command, i get an error.
gst-launch filesrc location=dr.mp3 ! mad ! alsasink
WARNING: erroneous pipeline: no element "mad"
I checked the paths, they seem to be in order.
The sink is working as it should;
gst-launch audiotestsrc ! alsasink -> results in nice tone.
I have a libmad.so in /usr/lib , but noticed that on my host system, i have an libgstmad.so in /usr/lib/gstreamer-1.0/ directory.
I got not errors when compiling, so i assume the file is not supposed to be there?
I think you need to have libgstmad.so too if you're trying to launch with !mad!
I got this to work by other means.
By running gst-inspect i found that i had another decoder available, namely 'mfw_mp3decoder'.
It plays mp3 flawlessly. Then the simple Phonon-code worked fine afterwards.
I dont remember whether i ran some gst-command that setup the path for playback or not.
Worth googling if you read this and have the same issue.
Thanks for all help!