Generate beautiful animated videos showcasing your GitHub repository's star history using Motia and Remotion.
- 🎨 Dual Theme Support: Choose between dark and light video themes
- 📹 Live Video Preview: Watch your video directly in the Motia Workbench
- ⚡ Real-time Processing: Track generation progress with live status updates
- 🎥 High-Quality Output: 1280x720 @ 60 FPS with CRF 18 encoding
- 🚀 Smooth Animations: Beautiful avatar scrolling and star count animations
- 💾 One-Click Download: Export your video as MP4
- Node.js (v18 or higher)
- npm (v9 or higher)
- GitHub Personal Access Token (for API access)
npm installCreate a .env file in the root directory:
GITHUB_TOKEN=your_github_personal_access_token_hereHow to get a GitHub token:
- Go to GitHub Settings → Developer settings → Personal access tokens
- Click "Generate new token (classic)"
- Select the
public_reposcope - Copy the generated token
npm run devThe Motia Workbench will open at http://localhost:3000
- Navigate to http://localhost:3000
- Click on "GitHub Stars" (⭐) in the left sidebar
-
Enter Repository Details:
- Owner:
MotiaDev - Repository:
motia
- Owner:
-
Choose Theme:
- 🌙 Dark: Black background with white text
- ☀️ Light: White background with black text
- Click "⭐ Generate Video"
- Wait 20-30 seconds for processing
- Watch the preview play automatically
- Click "📥 Download Video (MP4)"
This project uses Motia's event-driven architecture for scalable, asynchronous video generation:
┌─────────────────┐
│ Plugin UI │ ← User inputs repository & theme
└────────┬────────┘
│
▼
┌─────────────────┐
│ API Step │ ← Validates input, creates job
│ fetchStars │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Event Step │ ← Fetches GitHub star data
│ processStars │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Event Step │ ← Renders video with Remotion
│ renderVideo │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Video Served │ ← Download or preview
└─────────────────┘
- Motia Steps: API routes and event handlers for async processing
- Remotion: Programmatic video generation with React
- Motia Plugin: Custom UI integrated into Workbench
- State Management: Persistent job tracking with Motia state
github-stars-video-motia/
├── steps/
│ ├── github/
│ │ ├── fetchStars.step.ts # API endpoint to initiate generation
│ │ ├── processStars.step.ts # Fetch GitHub star data
│ │ ├── renderVideo.step.ts # Render video with Remotion
│ │ ├── getJobStatus.step.ts # Get job status
│ │ └── getStarsData.step.ts # Get cached star data
│ └── videos/
│ └── serveVideo.step.ts # Serve video files
├── remotion/
│ ├── composition.tsx # Main video composition
│ ├── schema.ts # Remotion props schema
│ ├── Root.tsx # Remotion root
│ └── index.ts # Entry point
├── plugins/
│ └── plugin-github-stars/
│ └── index.tsx # Workbench UI plugin
├── public/
│ └── videos/ # Generated videos stored here
├── motia.config.ts # Motia configuration
├── package.json
└── README.md
- Background:
#0a0a0a(Black) - Text:
white - Perfect for: Modern, sleek presentations
- Background:
#ffffff(White) - Text:
black - Perfect for: Professional, bright presentations
Edit steps/github/renderVideo.step.ts:
await renderMedia({
// ... other options
crf: 18, // Lower = higher quality (18 is visually lossless)
pixelFormat: 'yuv420p', // Standard format for compatibility
fps: 60, // Frames per second (smooth animations)
width: 1280,
height: 720,
});Edit remotion/composition.tsx:
export const animationDurationInSeconds = 3 // Change this value-
Check GitHub Token:
echo $GITHUB_TOKEN # Should print your token
-
Check Logs:
- Open Motia Workbench → "Logs" plugin
- Look for errors in the "RenderVideo" step
-
File Permissions:
chmod -R 755 public/videos
-
Check if video exists:
ls -lh public/videos/
-
Test direct access:
curl -I http://localhost:3000/videos/[your-video-filename].mp4
-
Clear browser cache and refresh
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build Motia steps |
npm run start |
Start production server |
npm run generate-types |
Generate TypeScript types |
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for your own repositories!
- Motia - Event-driven workflow framework
- Remotion - Video generation library
- GitHub API - Repository data
- Inspired by github-stars-video
If you encounter any issues or have questions:
- Check the Troubleshooting section above
- Review Motia logs in the Workbench
- Check Motia Documentation
- Check Remotion Documentation
Made with ❤️ using Motia and Remotion
