Next-gen viral content creation using AI reasoning, Manim animations, Remotion effects, and automated YouTube uploads.
- Extended Thinking: Claude Opus 4.5 with 10k token reasoning budget
- Semantic Understanding: AI analyzes content and generates custom visual metaphors
- Artistic Composition: Spatial layout, color psychology, camera movement
- Both Formats: 16:9 horizontal + 9:16 vertical
- Audio Sync: Perfect timing with voiceover segments
- Template Evolution: A/B testing framework for winning patterns
- 9 Preset Styles: ChromaticSmash, GlitchAssemble, TripleHit, ElasticSlam, WhipPan, NuclearDrop, PixelExplode, VaporTrail, ZoomPulse
- Remotion + Three.js: 3D graphics with programmatic control
- Edge-to-Edge Text: Maximum impact with minimal margins
- Viral Effects: Chromatic aberration, screen shake, glitch, flash frames
- One-Command Upload: OAuth 2.0 YouTube integration
- Batch Processing: Generate multiple variants for A/B testing
- Brain Rot B-Roll: Auto-download viral background footage
- Format Flexibility: Vertical (9:16) or horizontal (16:9)
# Check if installed
node --version
npm --version
# Install if needed (macOS)
brew install node# Check version
python3 --version
# Install if needed (macOS)
brew install python3# Check if installed
ffmpeg -version
# Install if needed (macOS)
brew install ffmpegcd remotion-shorts
npm installIMPORTANT: Keep credentials secure! Never commit secrets to git.
If you have access to the infi secrets manager:
# Credentials are automatically available via infi command
infi- Go to Google Cloud Console
- Create a new project or select existing
- Enable YouTube Data API v3:
- Navigate to "APIs & Services" β "Library"
- Search "YouTube Data API v3"
- Click "Enable"
- Create OAuth 2.0 credentials:
- Go to "APIs & Services" β "Credentials"
- Click "Create Credentials" β "OAuth 2.0 Client ID"
- Application type: Desktop app
- Name it (e.g., "YouTube Shorts Uploader")
- Download the JSON file
- Save as
client_secrets.jsonin project root# Move downloaded file to project mv ~/Downloads/client_secret_*.json /Volumes/Stick/shorts-project/client_secrets.json
Security Note: client_secrets.json is in .gitignore and will NOT be committed.
# Create virtual environment
cd /Volumes/Stick/shorts-project
python3 -m venv youtube_env
# Activate it
source youtube_env/bin/activate
# Install YouTube API packages
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-clientshorts-project/
βββ manim-animations/ # π AI-powered Manim scenes
β βββ ai_scene_generator.py # Core AI reasoning engine
β βββ batch_generate.py # A/B test variant generator
β βββ transcript_builder.py # Create transcript JSON
β βββ templates/
β β βββ successful/ # Winning templates
β β βββ variants/ # A/B test candidates
β β βββ archive/ # Historical versions
β βββ WORKFLOW.md # Usage guide
β βββ TRANSCRIPT_FORMAT.md # Input spec
β βββ TEMPLATES_NOTES.md # Evolution strategy
β
βββ remotion-shorts/ # Remotion viral effects
β βββ src/
β β βββ TitleViralTest.tsx # 9 viral animations
β β βββ YouTubeShort.tsx # YouTube Shorts compositions
β β βββ DualThreeScene.tsx # Full-length videos with 3D
β β βββ Root.tsx # All compositions
β βββ public/ # Audio files, b-roll
β
βββ output/ # Rendered videos
β βββ viral_tests/ # Individual animation tests
β βββ youtube_shorts/ # Final YouTube Shorts
β
βββ youtube_uploader.py # YouTube upload automation
βββ broll_downloader.py # Brain rot footage scraper
βββ client_secrets.json # OAuth credentials (DO NOT COMMIT)
βββ youtube_token.pickle # OAuth token (DO NOT COMMIT)
βββ README.md # This file
cd manim-animations
# 1. Create a transcript
cat > my_quotes.json << 'EOF'
{
"total_duration": 9.0,
"format": "horizontal",
"resolution": "1920x1080",
"theme": "auto",
"segments": [
{"start": 0.0, "end": 3.0, "text": "Dream big"},
{"start": 3.0, "end": 6.0, "text": "Work hard"},
{"start": 6.0, "end": 9.0, "text": "Stay humble"}
]
}
EOF
# 2. Generate AI scene (requires ANTHROPIC_API_KEY)
export ANTHROPIC_API_KEY='your-key-here'
python ai_scene_generator.py my_quotes.json my_scene.py
# 3. Render with Manim
source manim_env/bin/activate
manim -pql my_scene.py AIGeneratedScene
# 4. Upload to YouTube
cd ..
python youtube_uploader.py \
manim-animations/media/videos/my_scene/480p15/AIGeneratedScene.mp4 \
"Motivational Quotes" \
"AI-generated animation #shorts"- AI Reasoning: 10,000 token thinking budget analyzes your content
- Visual Metaphors: Automatically chosen based on theme (growth β rising graphs, contrast β diverging paths)
- Artistic Composition: Rule of thirds, color psychology, dynamic camera movement
- Format Aware: Adapts spatial layout for 16:9 vs 9:16
- Audio Sync: Perfect timing when audio files provided
# Generate 5 different versions to test
python batch_generate.py my_quotes.json 5
# Renders 5 unique AI-generated interpretations
# Pick the best performer after testing!See manim-animations/WORKFLOW.md for full documentation.
cd remotion-shorts
npx remotion render Viral-01-ChromaticSmash output.mp4npx remotion render YT-Short-02-WatchThis output/watch_this.mp4for i in {1..9}; do
npx remotion render Viral-0${i}-* output/viral_0${i}.mp4
done# Activate Python virtual environment
cd /Volumes/Stick/shorts-project
source youtube_env/bin/activate
# First upload will open browser for authorization
python youtube_uploader.py \
output/youtube_shorts/02_watch_this.mp4 \
"Watch This Transition π" \
"Smooth viral edit effects #shorts #transition"A browser will open asking you to authorize the app. After approval:
- Token is saved to
youtube_token.pickle - Future uploads are automatic (no browser needed)
# Public upload with tags
python youtube_uploader.py \
video.mp4 \
"Title" \
"Description" \
--tags "shorts,viral,transition,effects"
# Private upload
python youtube_uploader.py video.mp4 "Title" "Desc" --private
# Unlisted upload
python youtube_uploader.py video.mp4 "Title" "Desc" --unlisted# Upload all YouTube Shorts
for video in output/youtube_shorts/*.mp4; do
python youtube_uploader.py "$video" \
"Viral Transition Effects" \
"Eye-catching animations #shorts" \
--tags "shorts,viral,effects"
doneViral-01-ChromaticSmash- RGB split + screen shakeViral-02-GlitchAssemble- Digital slices assemblingViral-03-TripleHit- Three quick impactsViral-04-ElasticSlam- Elastic bounce with chromatic trailViral-05-WhipPan- Fast horizontal whipViral-06-NuclearDrop- Massive gravity dropViral-07-PixelExplode- Pixelated dissolutionViral-08-VaporTrail- Motion blur with color trailsViral-09-ZoomPulse- Rhythmic zoom with glow
YT-Short-01-BestTransition- 10.5s, 6 animations with numbered labelsYT-Short-02-WatchThis- 6s, 3 smooth effectsYT-Short-03-Smoothest- 7.5s, 4 premium effects
01-Bitcointhrough10-History- Educational shorts with voiceoverLLM-Attention,LLM-Temperature,LLM-Context- AI explainers
Edit remotion-shorts/src/Root.tsx:
<Composition
id="YT-Short-Custom"
component={YouTubeShort}
fps={30}
durationInFrames={270} // 9 seconds
width={1080}
height={1920}
defaultProps={{
hookText: "Your hook text here π₯",
animations: [
{ term: "WORD1", variantNum: 1 }, // ChromaticSmash
{ term: "WORD2", variantNum: 5 }, // WhipPan
{ term: "WORD3", variantNum: 8 }, // VaporTrail
],
}}
/>Viral animations are defined in src/TitleViralTest.tsx. Each case in the switch statement controls:
titleScale- Size transformationstitleOpacity- Fade in/outtitleTranslateX/Y- MovementchromaticAberration- RGB separationscreenShakeX/Y- Impact shakeflashOpacity- White flashes
"Client secrets not found"
- Make sure
client_secrets.jsonexists in project root - Verify it's valid JSON (not HTML error page)
"Access denied" or "Invalid grant"
- Delete
youtube_token.pickle - Run uploader again to re-authorize
"Quota exceeded"
- YouTube API has daily upload quota limits
- Default: 10,000 units/day (1 upload = ~1,600 units)
- Request quota increase in Google Cloud Console if needed
"Out of memory"
- Reduce concurrency:
npx remotion render --concurrency=2 - Close other applications
"Module not found"
cd remotion-shorts
rm -rf node_modules package-lock.json
npm install- β
client_secrets.jsonin.gitignore - β
youtube_token.picklein.gitignore - β Never paste credentials in chat/code
- β
Use environment variables or
infifor secrets - β Revoke OAuth tokens if compromised (Google Cloud Console)
Contains OAuth credentials and potentially sensitive video content.
# Initialize git if not already done
cd /Volumes/Stick/shorts-project
git init
# Add all files (secrets are in .gitignore)
git add .
git commit -m "Initial commit: Viral YouTube Shorts generator"
# Create private repo on GitHub, then:
git remote add origin git@github.com:YOUR_USERNAME/shorts-project.git
git branch -M main
git push -u origin main- Go to
https://github.com/YOUR_USERNAME/shorts-project/settings - Scroll to "Danger Zone"
- Confirm visibility is Private
- If public, click "Change visibility" β "Make private"
Never make this repository public!
Created with Claude Code (Sonnet 4.5) using:
- Remotion - Programmatic video generation
- Three.js - 3D graphics
- YouTube Data API v3 - Uploads
- FFmpeg - Video processing
MIT - Feel free to use for your own viral content!