SWS_DITHER - Cannot Run

For the developers that use FFmpeg in their software.
Post Reply
cjplay
Posts: 10
Joined: Tue Dec 06, 2011 7:55 pm

SWS_DITHER - Cannot Run

Post by cjplay » Tue Nov 19, 2013 9:04 pm

ISSUE -
As you can see below, I cannot seem to call or change the settings of sws_dither in the -sws_flags option. I'm doing 10-bit to 8-bit conversion testing on some assets and the standard rounding does not appear to work well for me on true gradients. I would like to test some of the others but I cannot find documentation for using the dither flag in libswscale or how to specify the flags for sws_flags beyond the scaler type. Can anyone help me with my syntax? I've tried more than 15 permutations.


CONSOLE -
ffmpeg.exe -i "J:\rnd\TestFootage\GDMX_E0162182_HP7B_TestClip_25-37mi
ns__DNxHD_HQdither8bit.mov" -sws_flags lanczos;sws_dither=bayer -an -r 24000/1001 -pix
_fmt yuv420p -f yuv4mpegpipe - |
ffmpeg version N-53616-g7a2edcf Copyright (c) 2000-2013 the FFmpeg developers
built on May 29 2013 01:21:08 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
libavutil 52. 34.100 / 52. 34.100
libavcodec 55. 12.102 / 55. 12.102
libavformat 55. 7.100 / 55. 7.100
libavdevice 55. 1.101 / 55. 1.101
libavfilter 3. 72.100 / 3. 72.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[swscaler @ 00000000048a4b00] [Eval @ 000000000022f590] Undefined constant or mi
ssing '(' in 'lanczos;sws_dither'
[swscaler @ 00000000048a4b00] Unable to parse option value "lanczos;sws_dither=bayer"
Error setting option sws_flags.
Error parsing option 'sws_flags' with argument 'lanczos;sws_dither'.
Error splitting the argument list: Error number -22 occurred


Thank you,
Chris.

RichWebb
Posts: 1
Joined: Wed Dec 04, 2013 12:33 am

Re: SWS_DITHER - Cannot Run

Post by RichWebb » Wed Dec 04, 2013 12:38 am

In stead of "-sws_flags lanczos;sws_dither=bayer" try
"-sws_flags lanczos -sws_dither bayer".

cjplay
Posts: 10
Joined: Tue Dec 06, 2011 7:55 pm

Re: SWS_DITHER - Cannot Run

Post by cjplay » Fri Mar 07, 2014 8:43 pm

The man shoots, he scores! Thank you!! Quality wasn't exactly what I expected, so we're working on a Floyd-Steinberg instead. Thanks for the hand!

Videogamer555
Posts: 43
Joined: Sat Nov 09, 2013 1:16 am

Re: SWS_DITHER - Cannot Run

Post by Videogamer555 » Sat Sep 20, 2014 10:12 am

RichWebb wrote:In stead of "-sws_flags lanczos;sws_dither=bayer" try
"-sws_flags lanczos -sws_dither bayer".

My copy of FFMPEG does not recognize the -sws_dither commandline switch. Can you please tell me how to get it to work?

Post Reply
'