Skip to content
Skip to content
Technical4 min read

Inside the 19-Stage Pipeline: How Sphot Builds a Reel

R
Rahul Sharma·

Why 19 Stages?

Most video tools treat production as a single operation: you drag clips, apply a template, export. Sphot treats it as a multi-phase system — because great Reels aren't just assembled, they're produced.

Each stage is atomic: it receives structured input, does one job, and passes structured output to the next stage. If any stage fails, the pipeline retries without affecting the others.

Phase 1: INGEST

Stage 1 — Drive Sync

Sphot polls your connected Google Drive folder at regular intervals. When new video files appear, the sync agent downloads them to the render node and registers each file in the job queue.

Stage 2 — Footage Validation

Before anything processes your footage, it's validated: codec, resolution, duration, audio channels. Files below 720p or under 5 seconds are flagged for review rather than processed blindly.

Stage 3 — Frame Extraction

One keyframe per 2 seconds is extracted. These frames feed the perception engine — not the full video — which keeps analysis fast even for 10-minute source clips.

Phase 2: SCRIPT

Stage 4 — Scene Understanding

The perception engine runs multi-modal analysis on every extracted frame: object detection, scene classification, motion estimation, colour grading assessment. The output is a structured scene graph.

Stage 5 — Hook Generation

Based on the scene graph and your brand knowledge base, the AI generates 3 candidate hooks (opening lines). The highest-scoring hook by retention-prediction model is selected.

Stage 6 — Script Writing

A full Reel script is written: hook → value body → call to action. The script respects your brand voice, content category, and target audience defined in your Brand Kit.

Stage 7 — Voiceover Synthesis

If voiceover is enabled, the script is synthesised using your selected voice model. Timing is computed per line so the voiceover aligns with the visual edit.

Phase 3: TIMELINE

Stage 8 — Clip Selection

The scene graph and script are used to select the most relevant clips from your footage. Not all footage is used — only the segments that match the narrative beat of each script line.

Stage 9 — Edit Assembly

Selected clips are arranged on a timeline. Cut points are calculated algorithmically: pace is matched to the hook type (fast cuts for energy, slower for tutorial content).

Stage 10 — Music Matching

A music track is selected from the licensed library based on BPM, mood, and the energy curve of the edit. The track is trimmed and faded to match the Reel duration exactly.

Phase 4: VISUAL

Stage 11 — Motion Graphics Render

The edit is sent to After Effects via Nexrender. Your Brand Kit colours, fonts, and logo are injected into the motion graphics template. Renders run on the cloud render node.

Stage 12 — Subtitle Generation

Subtitles are auto-generated from the script or voiceover transcript. They're burned in with your brand font at the position and size defined in your Brand Kit.

Stage 13 — Colour Grade

A colour LUT matching your brand aesthetic is applied. If no custom LUT is set, the system selects from a preset library based on the content category.

Stage 14 — Quality Control

The rendered output is reviewed by the QC agent: resolution check, audio level normalisation, subtitle alignment verification, and aspect ratio validation (9:16).

Phase 5: PUBLISH

Stage 15 — Cover Generation

Three cover frame candidates are extracted from the final render at peak visual moments. You pick one at the approval step, or the AI selects the highest-contrast frame.

Stage 16 — Caption Generation

A caption is written using the script, brand voice, and your content category. Hashtag clusters are appended based on your target audience and niche.

Stage 17 — Approval Gate

The Reel waits here. You receive a notification with a preview. One tap: approve or reject with feedback. If auto-approve is on, this stage is skipped.

Stage 18 — Instagram Publish

The approved Reel is uploaded to Instagram via the Graph API. Cover image, caption, hashtags, and location (if set) are all sent in a single API call.

Stage 19 — Analytics Seed

Once published, the analytics seed stage stores the initial post metadata: publish time, caption, hashtags, estimated reach window. This baseline is used to track engagement over the following 48 hours.

The Result

End-to-end, a typical Reel goes from Drive upload to published in under 5 minutes. The pipeline runs in the background — you get notified at Stage 17 (approval gate) and Stage 18 (published).

You never open a timeline. You never export a file. You never manually upload.

Newsletter

Creator production tips, weekly.

Behind-the-scenes on the pipeline, creator case studies, and feature updates.

Built on top of
Instagram API
Google Drive
After Effects
ffmpeg
Gemini AI