Skip to content

Video Content Analyzer

FieldValue
Namevideo-content-analyzer
Categorydata-pipeline
Complexityadvanced
Tagssidecar, ffmpeg, video-processing, llm-synthesis, shared-volume, nunjucks, templates, perceptual-hash, reporting
Authorrandybias
Min Version0.7.0

Extract frames from a video using an ffmpeg sidecar, deduplicate with perceptual hashing, analyze with batched Claude Vision, and compile rich HTML/Markdown reports with optional editorial audit. This is the most full-featured sidecar scaffold, demonstrating shared-volume data flow, batched Vision API calls, Nunjucks templating, and quality auditing.

This scaffold includes a sidecar container:

FieldValue
Nameffmpeg
Imagelinuxserver/ffmpeg:latest
Port9000
Health checkGET /health
CommunicationShared emptyDir volume at /shared/

The ffmpeg sidecar uses a public image with an inline Perl HTTP server injected via command:/args: (base64-encoded). This is the Tier 2 hook pattern — no custom Docker image needed. The sidecar also downloads yt-dlp at startup for YouTube URL support.

Endpoints:

  • GET /health — Readiness probe
  • POST /download-youtube — Download video from YouTube URL to shared volume
  • POST /extract-frames — Extract frames from video on shared volume

Video and frame files flow through the /shared/ emptyDir volume mounted in both the engine and sidecar containers. This contrasts with doc-converter which uses pure HTTP body data flow.

ingest-video → extract-frames → deduplicate-frames → analyze-frames → compile-report → audit-and-publish
NodePurpose
ingest-videoFetch video from URL (YouTube or direct MP4) to shared volume
extract-framesCall ffmpeg sidecar to extract frames at configured FPS
deduplicate-framesRemove near-duplicate frames using blockhash perceptual hashing
analyze-framesBatched Claude Vision API calls with rolling context
compile-reportRender HTML, Markdown, and Slack reports via Nunjucks templates
audit-and-publishOptional editorial audit, then store to RustFS and notify Slack
  • manual only

Every run analyzes a different video. These fields are passed at runtime via tntc run --input:

FieldRequiredDescription
video_urlYesYouTube URL or direct MP4 URL
titleNoReport title (default: YouTube title or “Video Analysis Report”)
context_promptNoContext hint for Vision model
ServiceTypeRequired
Anthropic APIExternalYes (Vision analysis + synthesis)
Video sourceExternalYes
tentacular-postgresExoskeletonOptional (metadata storage)
tentacular-rustfsExoskeletonOptional (report storage)
Slack webhookExternalOptional (notifications)
KeyDefaultDescription
timeout600sPer-node timeout
retries0No retries
fps1Frames per second to extract
max_frames100Max frames for Vision API (cost control)
dedup.hamming_threshold10Dedup sensitivity (0-256, lower = more aggressive)
analysis.batch_size10Frames per Vision API call
report.authorTentacularAuthor name in report
report.stylenarrative”narrative” or “structured”
audit.enabledtrueEnable editorial audit
audit.min_quality_score7Minimum quality score (1-10)
  • anthropic.api_key — Claude API key for Vision analysis and report synthesis
  • slack.webhook_url — Slack webhook for notifications (optional)

For a 1-hour video at 1 FPS, approximately 60 unique frames after dedup:

OperationEstimated Cost
Frame analysis (Sonnet, 6 batches)~$0.24
Report synthesis~$0.02
Editorial audit~$0.05
Total per run~$0.31
Terminal window
tntc scaffold init video-content-analyzer my-video-analyzer
cd ~/tentacles/my-video-analyzer
tntc deploy
tntc run --input '{"video_url": "https://example.com/talk.mp4", "title": "GTC Keynote"}'

Scaffold source: quickstarts/video-content-analyzer/