Skip to content

research/reference-format-analysis

Reference Format Analysis — extract format DNA from a short-form video.

Category: research
Source: workflows/research/reference_format_analysis.py

FieldTypeDefaultDescription
artifact_dirobjectOverride output directory.
enable_ocrbooleanfalseRun OCR on sampled frames.
enable_tone_inferencebooleantrueUse LLM for tone/hook/archetype inference.
extract_framesbooleanfalseSample keyframes to disk.
frame_sample_fpsnumber1.0FPS for frame sampling.
max_duration_secobjectReject videos longer than this.
platformstring"generic"Source platform: instagram_reels, tiktok, youtube_shorts, generic.
reference_video_pathstring""Local path to reference video file (MP4/MOV).
reference_video_urlstring""URL to download reference video from (YouTube, TikTok, Instagram, or direct link).
regenerateobjectWhen 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.
variantsinteger1Number of independent variant executions (1–10). When > 1, the engine runs the workflow N times with different sampling, producing N outputs.
whisper_modelstring"large-v3"Whisper model size for transcription.
FieldTypeDefaultDescription
format_dna_json_pathstring""Path to format_dna.json
frames_dirobjectPath to extracted frames
kindobjectVariant 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_pathstring""Path to analysis_manifest.json
ocr_json_pathobjectPath to ocr.json
recreation_blueprint_json_pathstring""Path to recreation_blueprint.json
shots_json_pathstring""Path to shots.json
summary_markdown_pathstring""Path to summary.md
transcript_json_pathstring""Path to transcript.json
validate_and_probe → detect_shots_and_visual_analysis → transcribe_and_analyze_audio → infer_format_dna → emit_analysis_artifacts
TaskDescription
validate_and_probeDownload (if URL provided), validate input video, and extract metadata.
detect_shots_and_visual_analysisDetect shots, classify composition, analyze motion and color.
transcribe_and_analyze_audioTranscribe speech, map pauses, detect retention hooks, analyze audio layers.
infer_format_dnaUse LLM to infer structural patterns, then assemble FormatDNA.
emit_analysis_artifactsWrite all analysis artifacts to disk.

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:

Terminal window
fab-workflow --from-file my-run.yaml

Or submit over the wire — the same file is the request body:

Terminal window
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.yaml

Every 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.).