[MPlayer-users] MPlayer won't STFU / MPlayer doesn't report errors

Martin Simmons vyslnqaaxytp at spammotel.com
Wed Jul 21 00:19:14 CEST 2004


>>>>> On Tue, 20 Jul 2004 07:02:51 -0700, rcooley <rcooley at spamcop.net> said:

  rc> On Mon, 19 Jul 2004 11:28:20 -0700
  rc> Mark Guptill <mguptill at gmail.com> wrote:

  >> 
  >> try putting "2>/dev/null" at the end of the mplayer command and
  >> options. for example

  rc> But if it was comming out of stderr, it wouldn't be causing a problem
  rc> with oggenc, since it's only reading from stdin...

  rc> If it  makes you feel any better, here you go:

  rc> $ mplayer Futurama-1_13.mpeg -really-quiet 2>/dev/null 
  rc> MPlayer dev-CVS-040707-07:29-3.2.2 (C) 2000-2004 MPlayer Team

  rc> CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred 1601 MHz (Family:
  rc> 6, Stepping: 1) Detected cache-line size is 64 bytes
  rc> CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
  rc> Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

  rc> Reading config file /etc/mplayer/mplayer.conf
  rc> Reading config file /home/root/.mplayer/config
  rc> Reading /home/root/.mplayer/codecs.conf: Reading
  rc> /etc/mplayer/codecs.conf: Using built-in default codecs.conf. font:
  rc> can't open file: /home/root/.mplayer/font/font.desc font: can't open
  rc> file: /usr/local/share/mplayer/font/font.desc

  rc> Obviously, that is output to stdout, not stderr, or I wouldn't see it.

Possibly my script below will help (I wrote this to record streaming audio).
The trick is to send the audio to fd 3 initially and then map this to stdout
while simultaneously mapping stdout/stderr somewhere else (tty in my case).

------------------------------------------------------------------------------
#!/bin/bash

if test $# -lt 2; then
   echo Syntax: $0 [mplayer-options] source dest
   exit 1
fi

opts=""
while test $# -gt 2; do
  opts="$opts $1";
  shift;
done
source="$1"
dest="$2"

mplayer -cache 256 -novideo -ao pcm -aofile /dev/fd/3 $opts "$source" 3>&1 1>/dev/tty 2>&1 |lame - "$dest"
------------------------------------------------------------------------------

__Martin




More information about the MPlayer-users mailing list