[MPlayer-users] running mplayer in background on xubuntu

Tom Evans tevans.uk at googlemail.com
Wed May 18 10:36:03 CEST 2011


On Tue, May 17, 2011 at 11:12 PM, Burghard Bode <CcahSart at gmx.de> wrote:
> Hi,
>
> I want to run mplayer in background on Linux (xubuntu), without
> stopping the playback. I want to hear the sound and see the video
> window, but do not see the command-line stuff.
> ...
> I need this commands to start mplayer with a PHP Script (exec), but I
> don't want to wait until the video is finished)
>
> Thanks

You are doing this all wrong. The mplayer process should not be part
of the same process group/session as your web server.

It is far easier to launch mplayer in idle slave mode, and write
commands to control the slave to a FIFO.

Eg, I launch an mplayer slave from .xinitrc:

/usr/local/bin/mplayer -idle -slave -input file=/home/tom/.mplayer/cmd.fifo &

I can then control this mplayer instance however I like, by writing
commands to the fifo (use mkfifo to create the fifo). Use 'mplayer
-input cmdlist' for a list of the commands you can use.

Cheers

Tom


More information about the MPlayer-users mailing list