video/long-form
Long-form video production pipeline — Seedance 2.0 powered, chapter-based.
Category: video
Source: workflows/video/long_form.py
Input Schema
Section titled “Input Schema”| Field | Type | Default | Description |
|---|---|---|---|
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. |
story | string | "" | |
topic | string | "" | |
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. |
Output Schema
Section titled “Output Schema”No schema defined.
Task Pipeline
Section titled “Task Pipeline”route_script_input → generate_script_branched → estimate_cost → generate_anchor_keyframes → generate_scene_backgrounds → produce_chapters → apply_scene_layers → generate_chapter_transitions → generate_title_card → concatenate_all → add_background_music → transcribe_and_subtitle → generate_long_form_thumbnail → generate_youtube_metadata → collect_long_form_output| Task | Description |
|---|---|
route_script_input | Determine script generation mode based on user input. |
generate_script_branched | Run the appropriate script generation path based on _script_mode. |
estimate_cost | Estimate production cost. Stops pipeline if dry_run=True. |
generate_anchor_keyframes | Generate visual anchor images for cross-chapter consistency via Seedance references. |
generate_scene_backgrounds | Generate background images per act for green screen compositing. |
produce_chapters | Generate voiceover + B-roll per act, assemble into chapter videos. |
apply_scene_layers | Apply visual layers (elements, weather, objects) to chapter videos. |
generate_chapter_transitions | Generate smooth transitions between chapters using Seedance i2v. |
generate_title_card | Generate a title card that fades into the first chapter. |
concatenate_all | Concatenate title card + chapters + transitions into final video with fade-out. |
add_background_music | Generate BGM and mix into video with speech-aware ducking via raw ffmpeg. |
transcribe_and_subtitle | Transcribe voiceover and burn subtitles onto the video. |
generate_long_form_thumbnail | Generate a YouTube thumbnail for the long-form video. |
generate_youtube_metadata | Generate YouTube title, description with chapter timestamps, and tags. |
collect_long_form_output | Collect and format final output. Persist artifacts. |
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/long-form
# Optional fields — copy any line(s) under `input:` and uncomment to set:# story: ""## topic: ""#
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/long-form' \ -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_long_form_outputhas no Pydantic return type — workflow output schema is null. Declare a WorkflowOutput subclass and pass it to Flow(output=…) for a strict contract.