Opened 4 years ago

Last modified 4 years ago

#8587 open defect

Background color is black instead of default background color

Reported by: Indiana Kernick Owned by:
Priority: minor Component: avutil
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The following snippet has a black background color. It stands out as wrong in the output of the ffmpeg command-line tool.

[libx264 @ 0x7fddb3011a00] 

All other text in the output has the default background color but this snippet has a black background color. The background color of the terminal is not necessarily black. It might be gray or some other color.

To be clear:

Black   background  "\x1B[40m"
Default background  "\x1B[49m"

"\x1B[49m" should be used instead of "\x1B[40m".

I believe that the snippet is produced whenever the H.264 codec is used. The snippet also has a cyan foreground color so it stands out as the only colored text in the log. I don't have a problem with the foreground color but as I've already said, the background color stands out as very wrong.


Upon checking the version I was using, I found another instance of this issue.

ffmpeg --version

I realise that I should use a single dash but the error message that I got had a black background color.

Unrecognized option '-version'.
Error splitting the argument list: Option not found

https://i.imgur.com/AwcCmhl.png


An even shorter way to reproduce this issue is invoke ffmpeg without an arguments

ffmpeg

The message at the end of the log has a black background color.

Use -h to get full help or, even better, run 'man ffmpeg'

To summarise, there are some instances where "\x1B[40m" is being used when "\x1B[49m" would be more appropriate.

Change History (14)

comment:1 by Elon Musk, 4 years ago

Resolution: invalid
Status: newclosed

in reply to:  1 comment:2 by Balling, 4 years ago

Replying to richardpl:
Well, there is a also this issue:
https://i.imgur.com/hdgqitF.png
Did not check master though.

comment:3 by Elon Musk, 4 years ago

--options are never supported use -option instead.

in reply to:  3 comment:4 by Balling, 4 years ago

Replying to richardpl:

--options are never supported use -option instead.

The issue is not about that at all.

comment:5 by Indiana Kernick, 4 years ago

Resolution: invalid
Status: closedreopened

Why was this closed? I'm not asking why I received an error message after typing ffmpeg --version as richardpl seems to think. The report is about the formatting of the error message itself. Balling has reproduced the issue and shown a screenshot.

comment:6 by Elon Musk, 4 years ago

Resolution: fixed
Status: reopenedclosed

comment:7 by Balling, 4 years ago

Can you please attach screenshot of a master version and with normal h264 reencode and normal terminal, gnome-terminal.

comment:8 by Carl Eugen Hoyos, 4 years ago

Please avoid adding more screenshots, all interested parties can reproduce themselves.

comment:9 by Carl Eugen Hoyos, 4 years ago

Version: 4.2git-master

comment:10 by Carl Eugen Hoyos, 4 years ago

Resolution: fixed
Status: closedreopened

Patch sent, this is possibly wont-fix.

comment:11 by Carl Eugen Hoyos, 4 years ago

Component: ffmpegavutil

in reply to:  10 ; comment:12 by Balling, 4 years ago

Status: reopenedopen

Replying to cehoyos:

Patch sent, this is possibly wont-fix.

The obvious problem here is that you do not close colour and background colour on exit(), this affects new line after exit, that is bad. I wanted to report it long ago, BTW, did not find the power to do so((

Please avoid adding more screenshots

It will not affect you server, everything is on imgur.

in reply to:  12 comment:13 by Carl Eugen Hoyos, 4 years ago

Replying to Balling:

Replying to cehoyos:

Patch sent, this is possibly wont-fix.

The obvious problem here is that you do not close colour and background colour on exit(), this affects new line after exit, that is bad. I wanted to report it long ago, BTW, did not find the power to do so((

This is not what was reported here and I am not completely convinced that there is an issue that can be fixed in FFmpeg.

Please avoid adding more screenshots

It will not affect you server, everything is on imgur.

You misunderstand:
This is not about the possible effect on a server but the fact that screenshots should be avoided on this bug tracker at (nearly) all costs, this ticket is a rare exception (but I don’t consider the attached screenshots particularly useful).

Last edited 4 years ago by Carl Eugen Hoyos (previous) (diff)

comment:14 by Balling, 4 years ago

This is not what was reported here and I am not completely convinced that there is an issue that can be fixed in FFmpeg.

Well, the background is a preference issue but the fact you leak colour to new line is strange ;) And this also happens inside the output...

Note: See TracTickets for help on using tickets.