; Beat-synced video recipe (recipe "beat-sync" :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, invert on odd beats (def synced-video (slice-on video analysis :times times :effect invert :pattern alternate)) ; Mux video with audio (mux synced-video audio))