[MPlayer-users] Re: mplayer during system init

Jonathan Rogers jonner at teegra.net
Wed Jun 4 17:29:12 CEST 2003


MAL wrote:
> cat <mpeg2_file> | /usr/local/bin/mplayer -vo fbdev -nosound -nocache -

May I ask why you're using cat? This command would work just as well:
---------------------------------------------------------------------
/usr/local/bin/mplayer -vo fbdev -nosound -nocache <mpeg2_file>
---------------------------------------------------------------------

This would also work fine, though with a convoluted syntax:
---------------------------------------------------------------------
/usr/local/bin/mplayer -vo fbdev -nosound -nocache - < <mpeg2_file>
---------------------------------------------------------------------

Both of those allow seeking, since mplayer gets a file descriptor of the 
file itself, rather than a pipe.

But, more to the point, it looks like your problem is related to the 
lack of a controlling tty. On Linux, processes don't normally use 
/dev/tty as a controlling tty. Rather, they typically use virtual 
consoles, rather than the one main one. It should work to redirect stdin 
and stdout to /dev/null, like this:
---------------------------------------------------------------------
/usr/local/bin/mplayer -vo fbdev -nosound -nocache <mpeg2_file> \
 >/dev/null </dev/null 2>&1
---------------------------------------------------------------------

An even better idea would be to check how mplayer is run from dedicated 
distros like these two, since they've probably dealt with the same 
issues already:
<URL:http://geexbox.free.fr/us/index.html>
<URL:http://movix.sourceforge.net/>

Jonathan Rogers



More information about the MPlayer-users mailing list