Clip Workflows
Clip workflows transform longer videos into short-form viral content. They handle moment detection, clip extraction, reframing, subtitles, hooks, dubbing, and effects.
Clip Generator
Section titled “Clip Generator”Workflow: clip/clip_generator
Complete pipeline: download a video, detect viral moments, extract clips, reframe to vertical, add subtitles, hooks, and effects.
# From YouTubefabric run clip/clip_generator --input url="https://youtube.com/watch?v=..."
# From local filefabric run clip/clip_generator --input media_path="/path/to/podcast.mp4"Pipeline
Section titled “Pipeline”transcription_pipeline │ detect_viral_moments (Gemini moment scoring) │ extract_clips (FFmpeg at timestamps) │ reframe_pipeline (MediaPipe + YOLO → 9:16) │ subtitle_pipeline (word-level subtitles) │ hook_overlay_pipeline (AI text overlays) │ effects_pipeline (AI color grading) │ collect_final_clips| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | — | YouTube or video URL |
media_path | string | — | Local video file |
query / topic | string | "" | Focus topic for moment detection |
Output
Section titled “Output”{ "clips": [ { "id": "clip_001", "path": "/tmp/clip_001_final.mp4", "hook": "You won't believe what happened next", "start": 45.2, "end": 75.8, "duration": 30.6, "score": 0.92 } ], "total_clips": 5}Blur Reframe
Section titled “Blur Reframe”Workflow: clip/blur_reframe
Converts landscape to 9:16 vertical without cropping — the full frame is visible with a blurred background fill (pillarbox style).
fabric run clip/blur_reframe --input media_path="/path/to/landscape.mp4"Output
Section titled “Output”{ "vertical_path": "/tmp/blur_reframe.mp4", "reframe_mode": "blur"}AI Dubbing
Section titled “AI Dubbing”Workflow: clip/dubbing
Translates and dubs video audio into 30+ languages using ElevenLabs voice synthesis.
fabric run clip/dubbing \ --input media_path="/path/to/video.mp4" \ --input target_language="Spanish" \ --input full_text="Original transcript..."Pipeline
Section titled “Pipeline”translate_transcript → generate_dubbed_audio → replace_audio_track| Parameter | Type | Default | Description |
|---|---|---|---|
full_text | string | required | Original transcript |
target_language | string | required | Target language name |
voice_id | string | auto | ElevenLabs voice ID |
elevenlabs_api_key | string | env | API key |
Output
Section titled “Output”{ "dubbed_path": "/tmp/dubbed_spanish.mp4", "dubbed_audio_path": "/tmp/dubbed_audio.mp3"}Hook Overlays
Section titled “Hook Overlays”Workflow: clip/hooks
Generates attention-grabbing text and burns it as an animated overlay on the first 3 seconds of a clip.
fabric run clip/hooks \ --input media_path="/path/to/clip.mp4" \ --input hook="This changes everything"Pipeline
Section titled “Pipeline”generate_hook_text → burn_hook_overlayIf no hook text is provided, the LLM generates one from the transcript excerpt.
Output
Section titled “Output”{ "hooked_path": "/tmp/hooked_clip.mp4", "hook_text": "This changes everything"}Video Effects
Section titled “Video Effects”Workflow: clip/effects
Uses Gemini to generate professional FFmpeg filter chains based on content type and mood, then applies them.
fabric run clip/effects \ --input media_path="/path/to/clip.mp4" \ --input mood="dramatic" \ --input content_type="talking_head"Pipeline
Section titled “Pipeline”generate_effect_filters → apply_effectsOutput
Section titled “Output”{ "effects_path": "/tmp/effected_clip.mp4", "ffmpeg_filters": "eq=contrast=1.1:brightness=0.02,unsharp=5:5:0.5"}