Replace batch DAG system with streaming architecture
- Remove legacy_tasks.py, hybrid_state.py, render.py - Remove old task modules (analyze, execute, execute_sexp, orchestrate) - Add streaming interpreter from test repo - Add sexp_effects with primitives and video effects - Add streaming Celery task with CID-based asset resolution - Support both CID and friendly name references for assets - Add .dockerignore to prevent local clones from conflicting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
44
streaming/__init__.py
Normal file
44
streaming/__init__.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""
|
||||
Streaming video compositor for real-time effect processing.
|
||||
|
||||
This module provides a frame-by-frame streaming architecture that:
|
||||
- Reads from multiple video sources with automatic looping
|
||||
- Applies effects inline (no intermediate files)
|
||||
- Composites layers with time-varying weights
|
||||
- Outputs to display, file, or stream
|
||||
|
||||
Usage:
|
||||
from streaming import StreamingCompositor, VideoSource, AudioAnalyzer
|
||||
|
||||
compositor = StreamingCompositor(
|
||||
sources=["video1.mp4", "video2.mp4"],
|
||||
effects_per_source=[...],
|
||||
compositor_config={...},
|
||||
)
|
||||
|
||||
# With live audio
|
||||
audio = AudioAnalyzer(device=0)
|
||||
compositor.run(output="output.mp4", duration=60, audio=audio)
|
||||
|
||||
# With preview window
|
||||
compositor.run(output="preview", duration=60)
|
||||
|
||||
Backends:
|
||||
- numpy: Works everywhere, ~3-5 fps (default)
|
||||
- glsl: Requires GPU, 30+ fps real-time (future)
|
||||
"""
|
||||
|
||||
from .sources import VideoSource, ImageSource
|
||||
from .compositor import StreamingCompositor
|
||||
from .backends import NumpyBackend, get_backend
|
||||
from .output import DisplayOutput, FileOutput
|
||||
|
||||
__all__ = [
|
||||
"StreamingCompositor",
|
||||
"VideoSource",
|
||||
"ImageSource",
|
||||
"NumpyBackend",
|
||||
"get_backend",
|
||||
"DisplayOutput",
|
||||
"FileOutput",
|
||||
]
|
||||
Reference in New Issue
Block a user