Example: If one uses the well known video tool ffmpeg for validation in a command like:
Code: Select all
ffmpeg -loglevel warning -i D:\videos\soemcorruptedfile.mp4 -f null -
then the ffmpeg warnings are displayed in colors at the commandprompt.
Excellent so far.
Now I want to redirect the ffmpeg output to a logfile and want to keep the colored lines.
So when I code
ffmpeg ..... >D:\myoutput.log 2>D:\myoutput.log
or
ffmpeg ..... >D:\myoutput.log 2>&1
And open the resulting logfile in a well know editor like Notepad++ then there is no color any more.
Just black-on-white text.
How can I redirect the colors as well?
Are colors a matter of ANSI or Unicode?
Is the issue of not-color-displaying possibly only a Notepad++ problem?
Even worse: If I do not redirect output to logfile but just the warnings from stderr to stdout then the colors are vanishing:
ffmpeg ..... 2>&1