[FFmpeg-user] fftfilt

Michael Koch astroelectronic at t-online.de
Tue Oct 12 11:54:19 EEST 2021


I have a question about the "fftfilt" filter. What's the default value 
of the weight_U and weight_V options? I'm asking because I get an 
unexpected result.

This command line creates my input image for testing:

ffmpeg -f lavfi -i color=black:s=300x50 -lavfi 
drawgrid=c=white:y=-1:w=2:h=51,split[a][b];[b]crop=iw/2:x=0,scale=2*iw:ih:flags=neighbor,split[b][c];[c]crop=iw/2:x=0,scale=2*iw:ih:flags=neighbor,split[c][d];[d]crop=iw/2:x=0,scale=2*iw:ih:flags=neighbor,split[d][e];[e]crop=iw/2:x=0,scale=2*iw:ih:flags=neighbor,split[e][f];[f]crop=iw/2:x=0,scale=2*iw:ih:flags=neighbor[f];[a][b][c][d][e][f]vstack=6,split[h][v];[v]transpose[v];[v][h]hstack 
-frames 1 -y test.png

This is the fftfilt lowpass example from the official documentation:

ffmpeg -i test.png -vf fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)' -y 
out1.png

Problem: The output has a greenish tint.

If I set the weight_U and weight_V options to 1, then the greenish tint 
disappears:

ffmpeg -i test.png -vf 
fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)':weight_U=1:weight_V=1 -y 
out2.png

Michael




More information about the ffmpeg-user mailing list