;; Threshold effect - convert to pure black and white ;; Usage: python3 plan.py effects/threshold.sexp -p level=128 | python3 execute.py - -d . -o output.mp4 ;; ;; Parameters: ;; level: threshold cutoff (0 to 255, default: 128) ;; pixels below = black, above = white (recipe "threshold" :version "1.0" :encoding (:codec "libx264" :crf 20 :preset "medium" :audio-codec "aac" :fps 30) (effect threshold :path "sexp_effects/effects/threshold.sexp") ;; Default parameter (overridden by -p level=N) (def level 128) (def video (source :path "monday.webm")) (def clip (-> video (segment :start 0 :duration 10))) (def result (-> clip (effect threshold :level level))) result)