lut, lutyuv, lutrgb

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#lut_002c-lutrgb_002c-lutyuv, https://ffmpeg.org/ffmpeg-filters.html#geq

“lut” (, “lutyuv”, “lutrgb”) resembles “geq” but is more restrictive. In “lut” you can not use time stamps in expressions and expressions according to pixel positions can not be used. Instead, unlike ‘geq’, the converted value is automatically clipped, so it is easy to do simple things like ‘doubling the luma’. In addition, “lut” is much faster than “geq”.

00:00:00
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "geq='lum=min(lum(X,Y)*2,235+16):
            cr=cr(X,Y):
            cb=cb(X,Y)'" \
  out01_1.mp4
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "lutyuv=y=val*2" \
  out01_2.mp4
#
#
00:00:18
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "geq='lum=lum(X,Y):
            cr=128:
            cb=128'" \
  out02_1.mp4
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "lutyuv=u=128:v=128" \
  out02_2.mp4
#
#
00:00:36
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "geq='r=0:g=0:b=b(X,Y)'" \
  out03_1.mp4
#
#
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "lutrgb=r=0:g=0" \
  out03_2.mp4
#
#
00:00:54
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "geq='r=255-r(X,Y):g=255-g(X,Y):b=255-b(X,Y)'" \
  out04_1.mp4
#
#
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "lutrgb=r=negval:g=negval:b=negval" \
  out04_2.mp4
#
#
00:01:12
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "geq='lum=235+16-lum(X,Y):
cr=cr(X,Y):
cb=cb(X,Y)'" \
  out05_1.mp4
#! /bin/sh
ffmpeg -y -i Pexels_flowers.mp4 \
  -vf "lutyuv=y=negval" \
  out05_2.mp4
#
#