wiki:

FancyFilteringExamples


Version 4 (modified by llogan, 4 years ago) (diff)

alphabetical order filters; add images for cellauto, life, mandelbrot

Fancy Filtering Examples

Video

cellauto

http://lrcd.com/temp/ffmpeg/cellauto.png

ffplay -f lavfi -i cellauto
ffmpeg -f lavfi -i cellauto -t 10 output.mkv

life

http://lrcd.com/temp/ffmpeg/life.png

ffplay -f lavfi life=s=640x480:mold=10:r=100:ratio=0.1:death_color=blue:life_color=#00ff00,boxblur=2:2

mandelbrot

http://lrcd.com/temp/ffmpeg/mandelbrot.png

ffplay -f lavfi -i mandelbrot
ffmpeg -f lavfi -i mandelbrot -t 10 output.mkv

Audio

aevalsrc

Making some random "musical" keys:

% cat expr
# floor(t): 0 0 0 0 0 ... 1 1 1 1 1 ... 2 2 2 2 2
#  => set a random key when floor(t) changes
if(eq(floor(t),ld(2)),
    st(0,random(4)*3000+1000));

# the next value to compare floor(t) with
st(2,floor(t)+1);

# mod(t,1) makes t always in the range [0;1) for each key
st(1,mod(t,1));

# 0.6*... + 0.4*... for "echo" effect
# exp() to mitigate the sound according to the time
(0.6*sin(1*ld(0)*ld(1))+
 0.4*sin(2*ld(0)*ld(1)))*exp(-4*ld(1))

And to test it:

ffplay -f lavfi -i "aevalsrc=$(grep -v '^#' expr|tr -d '\n'|sed 's/\([,;]\)/\\\1/g')"

Attachments (19)