[Ffmpeg-devel] ffmpeg help going to both stdout and stderr.

Michel Bardiaux mbardiaux
Mon Jun 12 10:37:09 CEST 2006


Emil Rojas wrote:
> The show_help function uses a bunch of calls to show_help_options and then
> at the end call av_opt_show.  The problem with this is that av_opt_show 
> uses
> av_log,  which ultimately uses av_log_default_callback which by default
> prints to standard error.  This is only a problem if you happen to want to
> look at the output without schooling back, say redirecting it to a file.  I
> have not idea how to check code into this system yet, but I think someone
> ought to change the default to stdout insted of stderr so that the help can
> be easily redirected.  Also, logging to stderr by default is a bit lame
> anyway.  Errors go do stderr.

ffmpeg uses stdout to pipe out output *multimedia* data (specify "-" as 
output file). You dont want to pollute the stadout with messages - hence 
you put them on stderr. Putting them on stdout in *some* would just be 
confusing.

On some shells it is relatively easy to redirect stderr. Eg with sh or bash:

ffmpeg -h 2>myfile

On csh/tcsh things are admittedly a bit more sucky, you cant redirect 
stdout and stderr independently:

ffmpeg -g >&myfile

-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list