Replacement for mplayer?

From the manual:

Q: How can I run MPlayer in the background?
A: Use: mplayer options filename < /dev/null &

The redirect (note it's an input from /dev/null) is critical. mplayer is expecting input.

So in my case, the following works:

mplayer -nolirc ~/Music/Aqua/Aquarium/Aqua\ -\ 03\ -\ Barbie\ Girl.mp3 < /dev/null &

This is a shorter variation:

cat 0 | mplayer ~/Music/Aqua/Aquarium/Aqua\ -\ 03\ -\ Barbie\ Girl.mp3 &

If you're just dealing with wavs, you can use paplay.

For mpeg playback you'll need something else. You could mess around manually decoding it and piping that back around into paplay but one alternative to mplayer is mpeg321:

mpg321 ~/Music/Aqua/Aquarium/Aqua\ -\ 03\ -\ Barbie\ Girl.mp3 &

And now that's playing. Great. I need to pick a better example when I do this stuff.


You can use cvlc, the commandline version of vlc.

cvlc ~/Music/pathToSomeAlbum/someSong.mp3 &

If you want to hide all of the output as well as run it in the background use this neat trick:

cvlc ~/Music/pathToSomeAlbum/someSong.mp3 2>&1 > /dev/null &

That will route all the output into /dev/null.