Overview
Strain Music Videos are fully produced AI music videos — one for every cannabis strain in the High IQ database. Each video stars Professor High, our cartoon cannabis scientist, as the main character living out the strain’s story: how it changes his day, his vibe, his world. The visuals match the song’s genre — G-Funk gets lowriders and palm trees, Dream Pop gets ethereal forests, Stoner Metal gets dark stages and smoke. Every video is generated automatically from the strain’s existing Lyria 3 AI song and Professor High’s mascot image. The result is a genre-appropriate 3-minute music video that captures the character of each strain in a way that text and photos alone cannot.Strain Music Videos are built on top of the Strain Music Pipeline. A strain must have an AI-generated song before a video can be created.
How It Works
The pipeline has 6 stages that transform a strain’s existing song and mascot image into a complete music video:1
Parse Lyrics
The strain’s timestamped lyrics are parsed into a structured timeline of sections (intro, verse, chorus, bridge, outro) with precise start and end times. Each section is split into individual clips of 10–20 seconds — matching how real music videos are edited, with multiple camera angles per verse.
2
Scene Director
An AI scene director (Gemini Flash Lite) reads the lyrics, music description, strain metadata, and genre to write a shot list. Each clip gets a scene description, camera direction, visual mood, and a shot type — either a performance shot (Professor High rapping or singing to camera) or a story shot (Professor High living the strain experience).
3
Scene Images
For each clip in the shot list, Gemini generates a 16:9 scene image (2048×1152) placing Professor High in the described setting. The Professor High reference image is included in every generation call to maintain character consistency. The first clip always starts from the strain’s existing mascot image to anchor the video in that strain’s visual identity.
4
Video Clips
Each scene image is animated into a video clip using fal.ai LTX-2.3 image-to-video. The clip’s prompt includes the scene description and camera direction (tracking shot, slow zoom, pan, etc.). Clips are generated in parallel — a 13-clip video runs up to 5 at a time.
5
Lip Sync
Performance shots — where Professor High is rapping or singing — get lip sync applied. The exact audio segment for that clip is extracted from the full song track and synced to the video clip using WaveSpeedAI. Story shots pass through untouched.
6
Compose and Upload
All clips are stitched together in order using ffmpeg with short crossfade transitions. The original Lyria 3 song is overlaid as the audio track, a thumbnail is extracted from the first chorus, and the final MP4 is uploaded to Supabase Storage. The strain’s record is updated with the video URL.
Pipeline Architecture
Location
packages/trigger/src/tasks/strain-music/.
Stage Summary
Provider-Agnostic Design
Both video generation and lip sync use swappable provider interfaces. The pipeline does not depend on any specific model — providers can be changed without modifying the pipeline stages. Launch providers:- Video: fal.ai LTX-2.3 image-to-video
- Lip Sync: WaveSpeedAI LTX 2.3 LipSync (or LatentSync on Replicate)
Character Consistency
Professor High’s visual identity is maintained across all 6 stages by including the Professor High reference image (mascot-images/reference/professor-high.png) in every image and video generation call — the same pattern the music pipeline uses for multimodal context. The strain’s mascot image serves as the opening frame so each video begins in the strain’s established visual world.
Running the Pipeline
Single Strain (Dashboard)
Go to the Trigger.dev dashboard and run thestrain-video-pipeline task with the strain slug as input.
Batch Processing
Runstrain-video-batch to process multiple strains. Pass specific slugs or a batch size:
Environment Variables
Mock Providers for Testing
Set these environment variables to use mock providers that skip external API calls and return placeholder files:Preview Mode
Preview mode stores every intermediate artifact for each strain so you can review and tune the output before committing to production:
Preview artifacts are accessible via the API:
Database and Storage
Supabase Storage
Bucket:strain-videos
Database Columns (strains_v2)
API
The strain complete endpoint includesvideoUrl and videoThumbnailUrl when a video exists:
Example — fetch 10 most popular tracks with minimal payload:
s-maxage=900, stale-while-revalidate=1800).
Cost Model
Each video costs approximately 5.00 to generate using hosted APIs. Self-hosting LTX-2.3 is a planned future option to reduce costs significantly.Clip count varies by song structure — a 3-minute song typically produces 12–14 clips depending on section lengths and how many splits the parser applies. The cost range above assumes 13 clips with ~6 performance shots.
Genre-to-Visual Style
The Scene Director maps each strain’s audio genre to a visual world. Examples:Mobile Music Hub
The High IQ mobile app includes a native Music Hub for streaming all AI-generated strain songs. It is distinct from the Strain Music Video pipeline (which generates full video productions) — the Music Hub plays the audio tracks that each video is built on. Key features of the mobile Music Hub:- Personalized “Your Music” section — strain songs cross-referenced with your stash and favorites, shown when ≥2 matches exist
- Filters — search by name, strain type, High Family, or genre
- Now Playing screen — gesture-driven seek slider, shuffle, repeat, BPM/key metadata, and collapsible lyrics panel
- Lock Screen / Control Center integration — playback continues and is controllable system-wide
Future Phases
Website Hero Integration
Replace the static mascot image on strain detail pages with the autoplaying music video as the hero visual.
YouTube Upload
Automatic upload to a dedicated strain music video YouTube channel after each video is generated.
Social Clips
Auto-generate 9:16 vertical crop edits from chorus sections for Instagram Reels and TikTok distribution.
Mobile Video Integration
Add the full music video to the strain detail carousel in the High IQ mobile app using expo-video. (Audio playback is already live via the Music Hub.)
Auto-Trigger
Fire video generation automatically as a fire-and-forget follow-on after the music pipeline completes.
Self-Hosted LTX-2.3
Run LTX-2.3 on dedicated GPU infrastructure to reduce per-video cost and improve generation speed.
Related Features
- Strain Music — The AI song pipeline that generates the audio each video is built on
- Strain Discovery — Browse and search the full strain database
- Label Scanner — Scan a product label to identify a strain and access its music video
