research/reference-format-analysis
Reference Format Analysis — extract format DNA from a short-form video.
Category: research
Source: workflows/research/reference_format_analysis.py
Input Schema
Section titled “Input Schema”| Field | Type | Default | Description |
|---|---|---|---|
artifact_dir | object | — | Override output directory. |
enable_ocr | boolean | false | Run OCR on sampled frames. |
enable_tone_inference | boolean | true | Use LLM for tone/hook/archetype inference. |
extract_frames | boolean | false | Sample keyframes to disk. |
frame_sample_fps | number | 1.0 | FPS for frame sampling. |
max_duration_sec | object | — | Reject videos longer than this. |
platform | string | "generic" | Source platform: instagram_reels, tiktok, youtube_shorts, generic. |
reference_video_path | string | "" | Local path to reference video file (MP4/MOV). |
reference_video_url | string | "" | URL to download reference video from (YouTube, TikTok, Instagram, or direct link). |
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. |
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. |
whisper_model | string | "large-v3" | Whisper model size for transcription. |
Output Schema
Section titled “Output Schema”| Field | Type | Default | Description |
|---|---|---|---|
format_dna_json_path | string | "" | Path to format_dna.json |
frames_dir | object | — | Path to extracted frames |
kind | object | — | Variant card shape: video / carousel / image / text. Surfaced on the per-variant entry of the run-output API and used by gallery UIs to pick the right layout. |
manifest_json_path | string | "" | Path to analysis_manifest.json |
ocr_json_path | object | — | Path to ocr.json |
recreation_blueprint_json_path | string | "" | Path to recreation_blueprint.json |
shots_json_path | string | "" | Path to shots.json |
summary_markdown_path | string | "" | Path to summary.md |
transcript_json_path | string | "" | Path to transcript.json |
Task Pipeline
Section titled “Task Pipeline”validate_and_probe → detect_shots_and_visual_analysis → transcribe_and_analyze_audio → infer_format_dna → emit_analysis_artifacts| Task | Description |
|---|---|
validate_and_probe | Download (if URL provided), validate input video, and extract metadata. |
detect_shots_and_visual_analysis | Detect shots, classify composition, analyze motion and color. |
transcribe_and_analyze_audio | Transcribe speech, map pauses, detect retention hooks, analyze audio layers. |
infer_format_dna | Use LLM to infer structural patterns, then assemble FormatDNA. |
emit_analysis_artifacts | Write all analysis artifacts to disk. |
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: research/reference-format-analysis
# Optional fields — copy any line(s) under `input:` and uncomment to set:# Override output directory.# artifact_dir: null## Run OCR on sampled frames.# enable_ocr: false## Use LLM for tone/hook/archetype inference.# enable_tone_inference: true## Sample keyframes to disk.# extract_frames: false## FPS for frame sampling.# frame_sample_fps: 1.0## Reject videos longer than this.# max_duration_sec: null## Source platform: instagram_reels, tiktok, youtube_shorts, generic.# platform: generic## Local path to reference video file (MP4/MOV).# reference_video_path: ""## URL to download reference video from (YouTube, TikTok, Instagram, or direct link).# reference_video_url: ""## Whisper model size for transcription.# whisper_model: large-v3#
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=research/reference-format-analysis' \ -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.).