video/reddit-stories
Reddit Stories pipeline — Reddit post screenshots over background video with TTS narration.
Category: video
Source: workflows/video/reddit_stories.py
Input Schema
Section titled “Input Schema”| Field | Type | Default | Description |
|---|---|---|---|
background_audio | string | "" | Background music track |
background_video | string | "" | Video ID, category, ‘random’, or ‘none’ |
bg_audio_volume | number | 0.05 | Background music volume |
blocked_words | string[] | — | Skip comments with these words |
language | string | "en" | Target language |
max_comments | integer | 6 | Max comments to include |
max_length | integer | 600 | Max comment length (chars) |
min_length | integer | 100 | Min comment length (chars) — shorter comments don’t make good video segments |
min_score | integer | 10 | Min upvote score for comments |
mode | string | "comments" | ’comments’ or ‘story’ |
overlay_opacity | number | 1.0 | Screenshot overlay opacity (0.0-1.0) |
platform | string | "youtube_shorts" | Target platform |
quality | string | "local" | Quality preset (default ‘local’). Other values: ‘free’, ‘budget’, ‘standard’, ‘premium’. The ‘local’ preset uses in-process Diffusers / Kokoro / Whisper backends and falls through to remote per-stage when a backend isn’t installed. |
reddit_url | string | "" | Direct URL to a Reddit post |
regenerate | object | — | When set, this run is a regeneration. Workflows may read direction / keep / extra_instructions to modulate prompts; the engine persists parent_run_id and parent_variant_index as run lineage columns. |
subreddit | string | "" | Subreddit to search in |
theme | string | "dark" | ’dark’, ‘light’, or ‘transparent’ |
topic | string | "" | Search query within subreddit |
tts_model | string | "" | TTS model override |
variants | integer | 1 | Number of independent variant executions (1–10). When > 1, the engine runs the workflow N times with different sampling, producing N outputs. |
voice_mode | string | "" | ’single’, ‘alternating’, or ‘random’ (empty = preset default) |
Output Schema
Section titled “Output Schema”No schema defined.
Task Pipeline
Section titled “Task Pipeline”fetch_reddit_post → select_comments → capture_screenshots → generate_segment_tts → fetch_background_video → merge_reddit_assets → compute_timeline_and_concat_audio → compose_reddit_video → mix_background_audio → burn_subtitles → burn_hook_overlay → generate_effect_filters → apply_effects → add_outro_fade → reddit-stories-output → collect_output| Task | Description |
|---|---|
fetch_reddit_post | Fetch Reddit post and comments via the public JSON API. |
select_comments | Filter and rank top comments for comment mode. |
capture_screenshots | Capture Reddit-style screenshots for all segments. |
generate_segment_tts | Generate TTS audio for each segment with per-commenter voice rotation. |
fetch_background_video | Select and prepare a background video. |
merge_reddit_assets | Merge parallel branch outputs into a single context. |
compute_timeline_and_concat_audio | Build the timeline and concatenate per-segment audio with silence gaps. |
compose_reddit_video | Compose final video — overlay screenshots on background video timed to audio. |
mix_background_audio | Mix background music under voiceover with speech-aware ducking. |
burn_subtitles | Burn word-level subtitles. |
burn_hook_overlay | Burn hook text overlay — uses post title as the hook. |
generate_effect_filters | Use Gemini to suggest FFmpeg filters based on content type. |
apply_effects | Apply AI-generated FFmpeg filters to the video. |
add_outro_fade | Add a fade-to-black outro at the end of the video. |
reddit-stories-output | Video output validation: reddit-stories-output |
collect_output | Collect final output and save artifact. |
Run-spec example
Section titled “Run-spec example”Save the YAML below as my-run.yaml, edit the values, and run with the CLI or POST it to the API. Required fields are uncommented; optional knobs are documented above the input: block — copy any line under input: and uncomment to set.
workflow: video/reddit-stories
# Optional fields — copy any line(s) under `input:` and uncomment to set:# Background music track# background_audio: ""## Video ID, category, 'random', or 'none'# background_video: ""## Background music volume# bg_audio_volume: 0.05## Skip comments with these words# blocked_words: []## Target language# language: en## Max comments to include# max_comments: 6## Max comment length (chars)# max_length: 600## Min comment length (chars) — shorter comments don't make good video segments# min_length: 100## Min upvote score for comments# min_score: 10## 'comments' or 'story'# mode: comments## Screenshot overlay opacity (0.0-1.0)# overlay_opacity: 1.0## Target platform# platform: youtube_shorts## Quality preset (default 'local'). Other values: 'free', 'budget', 'standard', 'premium'. The 'local' preset uses in-process Diffusers / Kokoro / Whisper backends and falls through to remote per-stage when a backend isn't installed.# quality: local## Direct URL to a Reddit post# reddit_url: ""## Subreddit to search in# subreddit: ""## 'dark', 'light', or 'transparent'# theme: dark## Search query within subreddit# topic: ""## TTS model override# tts_model: ""## 'single', 'alternating', or 'random' (empty = preset default)# voice_mode: ""#
input: {}Run it locally:
fab-workflow --from-file my-run.yamlOr submit over the wire — the same file is the request body:
curl -X POST 'https://gofabric.dev/v1/workflows/runs?name=video/reddit-stories' \ -H 'Authorization: Bearer fab_xxx' \ -H 'content-type: application/yaml' \ --data-binary @my-run.yamlEvery workflow also accepts the universal WorkflowInput fields — variants (1–10 fan-out) and regenerate (creative-direction hints with run lineage). See Run-specs (YAML / TOML / JSON) for the full top-level shape (metadata, priority, bundle, parent, etc.).
Warnings
Section titled “Warnings”- Last user task
collect_outputhas no Pydantic return type — workflow output schema is null. Declare a WorkflowOutput subclass and pass it to Flow(output=…) for a strict contract. - Task
merge_reddit_assetshas no Pydantic types — contract is opaque to consumers. - Task
burn_subtitleshas no Pydantic types — contract is opaque to consumers. - Task
reddit-stories-outputhas no Pydantic types — contract is opaque to consumers.