Initial commit: video effects processing system
Add S-expression based video effects pipeline with modular effect definitions, constructs, and recipe files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
28
recipe-lambda.sexp
Normal file
28
recipe-lambda.sexp
Normal file
@@ -0,0 +1,28 @@
|
||||
; Beat-synced video recipe with lambda reducer
|
||||
(recipe "beat-sync-lambda"
|
||||
:version "1.0"
|
||||
:encoding (:codec "libx264" :crf 22 :preset "fast" :audio-codec "aac")
|
||||
|
||||
; Declare analyzers and effects
|
||||
(analyzer beats :path "../artdag-analyzers/beats/analyzer.py")
|
||||
(effect invert :path "../artdag-effects/invert/effect.py")
|
||||
|
||||
; Sources
|
||||
(def video (source :path "new.webm" :description "Video input"))
|
||||
(def audio (-> (source :path "dizzy.mp3" :description "Audio input")
|
||||
(segment :start 0 :duration 10)))
|
||||
|
||||
; Analyze audio for beats
|
||||
(def analysis (-> audio (analyze beats)))
|
||||
|
||||
; Slice video at beat times using lambda reducer
|
||||
(def synced-video (slice-on video analysis
|
||||
:times times
|
||||
:init 0
|
||||
:fn (fn [acc i start end]
|
||||
{:source video
|
||||
:effects (if (odd? i) (list invert) (list))
|
||||
:acc (inc acc)})))
|
||||
|
||||
; Mux video with audio
|
||||
(mux synced-video audio))
|
||||
Reference in New Issue
Block a user