[MPlayer-dev-eng] [PATCH] silence the overly verbose mov demuxer

Oded Shimon ods15 at ods15.dyndns.org
Mon Mar 6 21:04:02 CET 2006


On Mon, Mar 06, 2006 at 08:39:40PM +0100, Diego Biurrun wrote:
> On Mon, Mar 06, 2006 at 11:35:32AM +0100, Dominik 'Rathann' Mierzejewski wrote:
> > On Monday, 06 March 2006 at 11:30, Ivan Kalvachev wrote:
> > > 2006/3/4, Diego Biurrun <diego at biurrun.de>:
> > > > $subject
> > > >
> > > > A few printf removals are added in for free.  Objections?  Otherwise
> > > > this will show up on -cvslog soon...
> > > 
> > > What is this your quest to remove all output from mplayer?
> > 
> > It's a Un*x paradigm not to output anything unless there's an error.
> 
> Precisely.  Eric Raymond calls it the "Rule of Silence" in The Art of
> Unix Programming:
> 
> http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2878450
> 
> "When a program has nothing surprising to say, it should say nothing."
> 
> > There's too much chatter from MPlayer by default and it's annoying sometimes.
> 
> Yes, MPlayer is much too verbose.  I find it annoying and I have had
> users complain to me about it.  Plus it's a big problem when using
> MEncoder in a pipe.

I tend to agree, but mencoder is beyond usable in any pipe, even if you 
completely silence mp_msg, there are still printfs, not only in mplayer, 
but even in libraries mplayer uses!! (which should really be ashamed of 
themselves for having printfs in a library, sdl is the only one that comes 
to mind right now, but there are others...)
The pipe argument is completely worthless in mplayer/mencoder case not only 
because they are too verbose but because they simply won't work...

And, well, just about every byte of mplayer's output is useful to SOMEONE. 
There are some overly verbose demuxers which should be cleaned up, but 
all the basic other messages are very useful for developers and bug 
reports... I find almost all multimedia programs to not be very quiet 
either...



21:55 ods15 at crate15 ~ $ faac -o /dev/null sources/mplayer/popcorn/a.wav 
Freeware Advanced Audio Coder
FAAC 1.24

Quantization quality: 100
Bandwidth: 16000 Hz
Object type: Low Complexity(MPEG-2) + TNS + M/S
File format: MPEG-2 AAC (ADTS)
Encoding sources/mplayer/popcorn/a.wav to /dev/null
   frame          | bitrate | elapsed/estim | play/CPU | ETA
 6000/8738  ( 68%)|  123.5  |   11.7/17.1   |   11.87x | 5.4  

21:57 ods15 at crate15 ~ $ mkvmerge -o /dev/null sources/mplayer/popcorn/a.wav
mkvmerge v1.5.5 ('Another White Dash') built on Dec 29 2005 14:12:45
'sources/mplayer/popcorn/a.wav': Using the WAV demultiplexer.
'sources/mplayer/popcorn/a.wav' track 0: Using the PCM output module.
The file '/dev/null' has been opened for writing.
progress: 100%
The cue entries (the index) are being written...
Muxing took 2 seconds.

21:58 ods15 at crate15 ~ $ mpg321 -o oss mdf/noise\ Folder/ACDC\ -\ TNT.mp3 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title  : TNT                             Artist: ACDC                          
Album  :                                 Year  :                               
Comment:                                 Genre :                               

Directory: mdf/noise Folder/
Playing MPEG stream from ACDC - TNT.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo

[0:02] Decoding of ACDC - TNT.mp3 finished.




And no, I'm not using them as an example for "if they are not cleaning up, 
why should we", I'm using them as an example as "multimedia programs are 
not quiet, it's most useful this way". (Although the copyright stuff of 
mpg123 is just silly)


I'm rather indifferent in moving _ALL_ of MPlayer's output to stderr.. It's 
a little more annoying when wanting to actually pipe the diagnosis 
messages, but it's not a big deal... Maybe everything up to MSGL_V (not 
including) can go to stderr.

But this is still a problem because of the incredibly dumb libraries...

- ods15




More information about the MPlayer-dev-eng mailing list