[FFmpeg-devel] [PATCH] fail before printing output format

Michael Niedermayer michaelni
Sat Dec 5 06:01:35 CET 2009

On Fri, Dec 04, 2009 at 12:26:40PM -0800, Baptiste Coudurier wrote:
> On 12/04/2009 04:34 AM, Michael Niedermayer wrote:
>> iam certainly not one who deals much with users but i think ffmpeg has
>> quite alot of users and there always will be someone who misses an
>> error message. If their number can be reduced that would be great but
>> that should not be at the expense of inconvenience to the more
>> inteligent users and especially not the deveopers.
> Well, it seems obvious that the developers know how to retrieve the 
> information they need.
> IMHO if 50% of users do not see the error message because there is 5 lines 
> of stuff they do not understand and don't care about, that is a quite big 
> problem.
>> Omiting information that we need in some bugreports could be a big
>> inconvenience ...
> Bug reports are asked with -v 99 so ideally the information we are talking 
> about would be included with a verbose > 1 check.

ideally yes i agree but then we also require gdb,valgrind,full uncut output
latest svn and a sample file. Its rare that all these are provided.

> Besides I personally find that quickly reading the last line that says 
> "error <why>" the best way to know where to look first.
> That's also why I rerun "make" without -j4  if there was an error, I have 
> to real time nor interest of crawling down the terminal to catch the error.
> I also find painful that gcc spits 2 terminals of error because only one 
> character was fucked up.

>> Printing the error message last without ommitig anything or making it
>> show up in shiny red letters should solve this
> I suddently fear about trying to use colors and be portable.

The kind of users who cannot read more than 1 line are only compatible
with very few platforms. Also i think the ANSI codes are quit portable,
i remember using them in DOS/windows times and normals shells and terminals
on linux support them too if iam not mistaken (though ive not checked if
they really are char by char the same ...)

> Printing the error message last is definitely what I want, and what the 
> patch ultimately does. Do you suggest to buffer the output of dump_format ?

Iam not sure if i understand you, wouldnt we need to buffer the av_log output
from the demuxer/decoder so we could then print it last?
That seems a possible solution, also leaving the first colum unused and
putting a big 'E' in it for errors makes them much more vissible.

But from a psycho-visual POV, humans use colors /motiones to quickly
recognize things (think of an tasty red apple in a tree, everyone sees it
immedeatly) so it might be worth to do a little extra work to make this
work portably. Even if its a little uncommon for *nix to have interfaces
desiged based on human psycho visual effects ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091205/2cc6c615/attachment.pgp>

More information about the ffmpeg-devel mailing list