(This is on a Raspberry Pi B running 2014-09-09-wheezy-raspbian, update and upgrade have been run, mplayer is installed and tested, coding using Python 3)
I only dabble in Linux and Pi so I have come to the experts for guidance.
Let me start by saying that this works:
Sudo apt-get install omxplayer. Check another article on how to install Raspbian. Deze pagina beschrijft het afspelen van audio op een Raspberry Pi, zowel via de Jackplug. Installeer Mplayer met het commando: sudo apt-get install mplayer.
This bash script is executed like such:sudo ./speech.sh Bob's your uncle
The Pi happily goes out to Google and plays, via mplayer, the TTS. This let's me know who my uncle is.
My trouble happens in Python.
My ultimate goal is to have a small python 3 script start at start-up and every so often say some random statement. This will be mounted inside of a ceramic skull for the delight of ghosts and ghouls in the neighborhood.
Here is my python. Hopefully someone can tell me what I am doing wrong?
I have tried os.system, subprocess, Popen.. and nothing has worked. The system call just prints the command string and then exits out (is the code ending before mplayer? If so how do you get it to wait?). The subprocess and Popen both complain that it can't find mplayer (I've tried fully qualified paths there and no luck).
So *Nix and Python gurus, care to point out how I'm being an idiot and how I can fix it. :-)
How To Install Mplayer
1 Answer
One common mistake when using subprocess
is that it needs the arguments to be supplied in a list, rather than a single string (unless you use some of the options like shell=True
). So your mplayer call should be:


Not the answer you're looking for? Browse other questions tagged pythonpython-3.xraspberry-piraspbianmplayer or ask your own question.
I am trying to install Mplayer or VLC player on ubuntu feisty but i can't do it. I try with apt-get:
I try apt-get -f install but it doesn't work neither. What to do please help me ?!
2 Answers
It looks to me like you might have an invalid /etc/apt/sources.list file. Try:
Then, try installing VLC again.
If this didn't help and you still getting an error:
The following packages have unmet dependencies. mplayer: Depends: mplayer-nogui but it is not going to be installed Depends: libvdpau1 but it is not installable E: Broken packages
Try to install these packages:
The following packages have unmet dependencies. mplayer-nogui: Depends: libvdpau1 but it is not installable E: Broken packages
And again:

Package libvdpau1 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package libvdpau1 has no installation candidate $ Dell 1130 toner chip reset software free download.
Ah-ha, gotcha! The issue is fixed by adding:
to the /etc/apt/source.list
and running: