Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use this

type mplayer
mplayer is aliased to `mplayer -fs -noconsolecontrols -loop 0'

to play files. I would like to mute the stdout stuff so I could keep bash to do other things by running mplayer with &.
This worked with GNOME 2 but since I updated to sid something went wrong.

MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team

Another thing:

When replaying after full cycle (the loop flag above) the window with the media that looped gets on top of everything else.

Like, if I watch a Survivor episode with no sound, and then play music videos in the background (that is, two mplayer processes), the music video gets focus at each new iteration.

Is there a way to turn this off but still keep the looping on?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
  1. To silence the output you could use shell IO redirection, either of:

    mplayer -noconsolecontrols <options> 2>&- 1>/dev/null &
    mplayer -slave <options> 2>&- 1>/dev/null &
    
  2. The -fixed-vo option should make mplayer reuse the same window thus fixing the focus grabbing.

This is based on the man page included with:

MPlayer 1.0rc2-4.3.2-DFSG-free (C) 2000-2007 MPlayer Team

Yes, that is Debian lenny's mplayer.

share|improve this answer
    
1. This disabled the audio, that wasn't my intention but to not have the stdout debug stuff so I could run mplayer from bash with & and then do other things in the terminal window. 2. -fixed-vo did work, thanks –  Emanuel Berg Apr 28 '12 at 12:52
    
Ah, I've updated the answer with a solution that works and that I've tested for 1 –  Dan D. Apr 28 '12 at 18:07
    
Right, I had forgotten about that solution. Cool 2>1 :) Alright, problem solved. –  Emanuel Berg Apr 28 '12 at 20:59
    
Actually, the 2>1 doesn't seem to work. It thinks it is a file name so a file named 1 is created. Of course, 2> /dev/null will do it. –  Emanuel Berg Apr 29 '12 at 0:49
    
I was mistaken in the syntax for IO redirection (ref) but that has been corrected. And I found after testing that if I didn't add the -slave option, mplayer wouldn't play when backgrounded. –  Dan D. Apr 29 '12 at 1:18
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.