LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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.

Notices

Reply
 
Search this Thread
Old 07-21-2004, 12:12 AM   #1
paco36
Member
 
Registered: Jan 2004
Distribution: Fedora Core 2, Gentoo
Posts: 33

Rep: Reputation: 15
Background Mplayer from Console


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,
paco
 
Old 07-21-2004, 12:25 AM   #2
newinlinux
Member
 
Registered: Dec 2003
Location: Next to Equator
Distribution: GNU/Linux 2.6.14
Posts: 382

Rep: Reputation: 30
u can use one console for one proggy. BTW, i use madplay for my mp3.
 
Old 07-21-2004, 10:18 AM   #3
oot
Member
 
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Rep: Reputation: 30
Three command-line programs you might already have are mpg123, mpg321, and play. Any of these (if you have them) should be able to play your mp3 files.

If you want one of these to run in the background instead of hogging the console, put "&" at the end.

Last edited by oot; 07-21-2004 at 10:20 AM.
 
Old 07-21-2004, 12:28 PM   #4
paco36
Member
 
Registered: Jan 2004
Distribution: Fedora Core 2, Gentoo
Posts: 33

Original Poster
Rep: Reputation: 15
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?

Thanks again,
paco
 
Old 07-21-2004, 01:02 PM   #5
oot
Member
 
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Rep: Reputation: 30
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.
 
Old 07-21-2004, 07:46 PM   #6
BinaryLinux
Member
 
Registered: May 2004
Distribution: Slackware 9.1 and 10
Posts: 35

Rep: Reputation: 15
Re: Background Mplayer from Console

Quote:
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?

Thanks,
paco
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.
 
Old 07-21-2004, 07:56 PM   #7
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 658

Rep: Reputation: 30
u can try nohup

for more info, see
man nohup
 
Old 07-22-2004, 11:09 AM   #8
paco36
Member
 
Registered: Jan 2004
Distribution: Fedora Core 2, Gentoo
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for the help! Logging into two consoles works great.

Thanks again,
-paco
 
Old 02-07-2013, 04:12 PM   #9
flake
LQ Newbie
 
Registered: May 2012
Posts: 8

Rep: Reputation: Disabled
You should try with -noconsolecontrols and -quiet ,
and & at the end
 
Old 02-07-2013, 04:22 PM   #10
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,542
Blog Entries: 1

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
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.
 
Old 02-07-2013, 04:59 PM   #11
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64&i386, Raspbian Wheezy, various VMs
Posts: 3,230

Rep: Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759
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.
 
Old 02-08-2013, 03:09 AM   #12
Loomx
LQ Newbie
 
Registered: Sep 2012
Distribution: Slackware
Posts: 21

Rep: Reputation: Disabled
You can't beat mplayer on the console, I reckon.
It does the business now, and it did in 2004, which incidentally is when this thread was started
 
Old 02-08-2013, 03:38 AM   #13
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,542
Blog Entries: 1

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
LoL. Did not notice how old it is.
 
Old 02-08-2013, 04:48 AM   #14
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64&i386, Raspbian Wheezy, various VMs
Posts: 3,230

Rep: Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759
Me neither, oh well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
console background mithereal Linux - Software 1 01-25-2005 03:56 PM
Console Desktop Background Corp186 Linux - Software 2 05-10-2004 07:15 AM
framebuffer console background? frieza Linux - Software 4 02-24-2004 12:21 PM
Console in Background CatSC Linux - Software 7 02-15-2004 07:21 PM
setting console background c0lin Linux - Newbie 1 11-04-2003 11:30 AM


All times are GMT -5. The time now is 12:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration