[FFmpeg-devel] [PATCH v7] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

Mats Peterson matsp888 at yahoo.com
Thu Feb 11 01:11:50 CET 2016


On 02/11/2016 12:07 AM, Mats Peterson wrote:
> For black & white AVI or QuickTime files, in order to produce a
> monochrome nut file, force the pixel format with "-pix_fmt monow" or
> "-pix_fmt monob".
>
> Unfortunately, there is a problem with converting from pal8 to monow,
> and I know what it is now. There seems to be some weird dithering going
> on of the white color, so there will be black pixels here and there in
> the monow output. A better way is to use "ffmpeg -i 1bpp.avi -vcodec
> copy -vtag B1W0 1bpp.nut". The "-vtag" option is currently needed,
> otherwise FFmpeg will use a RGB[15] codec tag for some reason.
>

An alternative is to use "-sws_dither none", it seems to work fine. I 
just don't understand why the fully white color is dithered at all when 
converting from pal8 to monow.

Mats



More information about the ffmpeg-devel mailing list