Update recipes to use IPFS CIDs
- Change :hash to :cid throughout - Update cat asset: QmXrj6tSSn1vQXxxEY2Tyoudvt4CeeqR9gGQwSt7WFrhMZ - Update dog effect: QmT99H4MC5p18MGuxAeKGeXD71cGCzMNRxFfvt4FuCwpn6 - Update invert effect: QmPWaW5E5WFrmDjT6w8enqvtJhM8c5jvQu7XN1doHA3Z7J Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
100
recipes/beat-cuts/recipe.yaml
Normal file
100
recipes/beat-cuts/recipe.yaml
Normal file
@@ -0,0 +1,100 @@
|
||||
# beat-cuts recipe
|
||||
# Analyzes music for beats, cuts between videos every N beats
|
||||
# Demonstrates: ANALYZE → MAP → SEQUENCE → MUX
|
||||
|
||||
name: beat-cuts
|
||||
version: "1.0"
|
||||
description: "Cut between videos on every 4 beats of the music"
|
||||
|
||||
dag:
|
||||
nodes:
|
||||
# === INPUTS ===
|
||||
|
||||
- id: music
|
||||
type: SOURCE
|
||||
config:
|
||||
input: true
|
||||
name: "Music"
|
||||
description: "Audio file to analyze for beats"
|
||||
|
||||
# Video pool - multiple variable inputs
|
||||
- id: video_pool
|
||||
type: SOURCE_LIST # NOT IMPLEMENTED: collects multiple inputs into a list
|
||||
config:
|
||||
input: true
|
||||
name: "Videos"
|
||||
description: "Video clips to cut between"
|
||||
min_items: 1
|
||||
|
||||
# === ANALYSIS ===
|
||||
|
||||
# Detect beats in audio → outputs data, not media
|
||||
- id: beats
|
||||
type: ANALYZE # NOT IMPLEMENTED: needs beat detection
|
||||
config:
|
||||
feature: beats # What to extract: beats, tempo, energy, spectrum, onsets
|
||||
# Output: { beat_times: [0.0, 0.48, 0.96, ...], tempo: 125.0 }
|
||||
inputs:
|
||||
- music
|
||||
|
||||
# Group beats into measures of 4
|
||||
- id: measures
|
||||
type: GROUP # NOT IMPLEMENTED: groups data into chunks
|
||||
config:
|
||||
size: 4
|
||||
output: segments # Convert to [{start, duration}, ...]
|
||||
inputs:
|
||||
- beats
|
||||
|
||||
# === VIDEO PROCESSING ===
|
||||
|
||||
# For each measure, extract a random slice from a random video
|
||||
- id: slices
|
||||
type: MAP # NOT IMPLEMENTED: applies operation to each item
|
||||
config:
|
||||
operation: RANDOM_SLICE # For each segment: pick random video, random offset
|
||||
seed_from: music # Deterministic based on music hash
|
||||
inputs:
|
||||
items: measures # The segments to iterate over
|
||||
pool: video_pool # The videos to sample from
|
||||
|
||||
# === COMPOSITION ===
|
||||
|
||||
# Concatenate all slices
|
||||
- id: video_concat
|
||||
type: SEQUENCE
|
||||
config:
|
||||
transition:
|
||||
type: cut
|
||||
inputs:
|
||||
- slices # SEQUENCE would need to accept list output from MAP
|
||||
|
||||
# Combine with original music
|
||||
- id: final
|
||||
type: MUX
|
||||
config:
|
||||
video_stream: 0
|
||||
audio_stream: 1
|
||||
shortest: true
|
||||
inputs:
|
||||
- video_concat
|
||||
- music
|
||||
|
||||
output: final
|
||||
|
||||
owner: "@giles@artdag.rose-ash.com"
|
||||
|
||||
# === NOTES ===
|
||||
#
|
||||
# New primitives needed:
|
||||
# SOURCE_LIST - collect multiple inputs into a list
|
||||
# ANALYZE(feature: beats) - detect beats, output { beat_times, tempo }
|
||||
# GROUP - chunk data into groups, output segments
|
||||
# MAP - apply operation to each item in a list
|
||||
# RANDOM_SLICE - extract random segment from random pool item
|
||||
#
|
||||
# Data flow:
|
||||
# music → ANALYZE → beat_times[] → GROUP → segments[] → MAP → video_slices[] → SEQUENCE
|
||||
#
|
||||
# The key insight: ANALYZE outputs DATA that flows to GROUP/MAP,
|
||||
# while media files flow through SEQUENCE/MUX
|
||||
Reference in New Issue
Block a user