Your message dated Thu, 17 Jun 2010 07:41:55 +0200
with message-id <87fx0musf0....@faui44a.informatik.uni-erlangen.de>
and subject line Re: Bug#586171: respect $TERM and/or provide --no-color
has caused the Debian Bug report #586171,
regarding respect $TERM and/or provide --no-color
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
586171: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586171
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: ffmpeg
Version: 5:0.6~svn20100603-0.0
Severity: wishlist
File: /usr/bin/ffmpeg

The program assumes a certain kind of terminal or something, and puts
escape sequences into the output to make different colors, and does not
consult $TERM or offer a --no-color option to turn it off.

I however have discovered a workaround:
$ ffmpeg x.flv y.mp3 2>&1|cat



--- End Message ---
--- Begin Message ---
On Thu, Jun 17, 2010 at 05:35:06 (CEST), jida...@jidanni.org wrote:

> Package: ffmpeg
> Version: 5:0.6~svn20100603-0.0
> Severity: wishlist
> File: /usr/bin/ffmpeg

this version has never been been uploaded to debian. please report such
bugs to the distributor where you received the package from.

> The program assumes a certain kind of terminal or something, and puts
> escape sequences into the output to make different colors, and does not
> consult $TERM or offer a --no-color option to turn it off.

This is wrong. See the relevant piece of code from libavutil/log.c:

#undef fprintf
static void colored_fputs(int level, const char *str){
    if(use_color<0){
#if defined(_WIN32) && !defined(__MINGW32CE__)
        CONSOLE_SCREEN_BUFFER_INFO con_info;
        con = GetStdHandle(STD_ERROR_HANDLE);
        use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR");
        if (use_color) {
            GetConsoleScreenBufferInfo(con, &con_info);
            attr_orig  = con_info.wAttributes;
            background = attr_orig & 0xF0;
        }
#elif HAVE_ISATTY
        use_color= getenv("TERM") && !getenv("NO_COLOR") && isatty(2);
#else
        use_color= 0;
#endif
    }

    if(use_color){
        set_color(level);
    }
    fputs(str, stderr);
    if(use_color){
        reset_color();
    }
}


> I however have discovered a workaround:
> $ ffmpeg x.flv y.mp3 2>&1|cat

This proves that the detection code as quoted above indeed works.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4


--- End Message ---
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to