Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I was wondering if there was any way to do this. I want to run mplayer from the console to play audio. When I issue the command mplayer MySong.mp3 or whatever it plays the song. However I want it to run in the background so that I can have mplayer running while I am in console WITHOUT starting X. Basicaly I want to listen to music while I do other stuff in console. Is this at all possible?
Thanks, I've gotten mpg123 to correctly play mp3's in the background using mpg123 *.mp3 &. However I do have many wma's. That's why I am trying to get mplayer to work. But when I use mplayer *.wma & it brings up a whole bunch of messages and hangs with no sound output. Any Ideas?
You probably can't do that, because mplayer will want to open a window even if it's running in the background. "play" may or may not handle wmas (it handles a lot of formats). Other than that, I don't really know what to suggest.
Originally posted by paco36 I was wondering if there was any way to do this. I want to run mplayer from the console to play audio. When I issue the command mplayer MySong.mp3 or whatever it plays the song. However I want it to run in the background so that I can have mplayer running while I am in console WITHOUT starting X. Basicaly I want to listen to music while I do other stuff in console. Is this at all possible?
I've had the same problem and I got round this by logging into two consoles as the same user, you have up to six consoles to use and you can access the different ones by pressing ALT+F1 to ALT+F6 depending on which one you want to use.
I personally use console 1 to do work or whatever else I want to do and use console 2 for playing my mp3s. Hope this helps.
I know you have asked specifically about mplayer but IMHO mpd/ncmpcpp is ideal for something like that. Although the server/client model might sound complicated, it's not. After the initial configuration, you just start mpd and one of its clients - ncmpcpp is imho the best mpd's cli client. You select your music/playlist/tracks and play them. You can exit ncmpcpp, do some things on the terminal and the music will be played in the background. Furthermore, you can change your desktop environment/window manager and the music will constantly be playing. You can even log out (kill X and completely logout in runlevel 3 and the music will not be interrupted. To be precise, when I go to bed and shutdown -h now my system, the music stops somewhere halfway through the system shutdown process.
mpd/ncmpcpp are full of features including editing tags, fetching lyrics, cli audio visualisation, to name a few.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
I echo the mpd/ncmpcpp recommendation. It is a little tricky yo set up if you're new to it but since discovering it I've not used anything else.
Oh, and another solution to your problem, and others, could be to use screen allowing for console switching and even split-screen with two or more consoles.