EP048 — Video Source Switcher Process Map

Architectural layout and execution routes to switch the video compilation source dynamically between Stock Footage and Generative AI engines.

Click any node to inspect routing configurations, code implementations, and providers.

1. Switch Router (Config Level)

generate_video.py

Parse Argument

Extracts --video-source flag parameter from console inputs.

100% · Accepts pexels, seedance, or higgsfield flags.
→
api_integrations.py

Provider Factory

Resolves the requested provider sub-class using the abstract factory pattern.

100% · Instantiates class matching target parameter input.

2. Stock Video Flow (Pexels)

PexelsProvider

Pexels Client

Requests stock database video clip matching keywords.

100% · Downloads pre-existing video streams from database. Cost: $0.

3. Generative Video Flow (Seedance / Higgsfield / Runway)

GenerativeProvider

AI Prompt Dispatcher

Sends visual descriptions directly to the AI text-to-video API.

50% · Base interface prepared. Specific API client wrappers can be plugged in when credentialed.
→
status_poller

Poll Generation

Waits for AI server GPU processing and returns final generated download URL.

50% · Standard webhook/polling loops mapped in API interface.