🎥 DEMO AUTO GENERATED VIDEO — WATCH ON INSTAGRAM
Stewie_it v1 is an experimental automation project inspired by a viral Instagram trend where Stewie and Peter Griffin humorously explain coding topics over gameplay footage (recent trend)
This project automates assembling these videos by combining user-provided scripts, AI-scraped voices, character images, and gameplay background, then sending them to user.
⚠️ This is an experimental project, created for fun and educational purposes. It uses tricks like scraping voices and rotating IPs via AWS EC2.
![]() |
![]() |
|---|---|
| Stewie explains a coding concept with AI voiceover | Peter reacts or adds commentary with AI voiceover |
| Meanwhile, gameplay footage plays in the background |
- The user sends a coding topic or full dialogue script to the Telegram bot.
- The bot expects a back-and-forth conversation format alternating between Stewie and Peter lines.
- Users can optionally generate or fetch scripts using ChatGPT externally and paste them in.
Here’s how you interact with the bot via Telegram:
![]() |
![]() |
|---|---|
| Telegram: Send content or prompts | Telegram: Get auto-generated video file |
- Voices are scraped from Parrot AI by spinning up an AWS EC2 instance that:
- Launches, scrapes voice clips for the dialogue, then shuts down automatically.
- AWS CloudWatch Events + Lambda handle EC2 lifecycle management to rotate IP addresses and avoid bans.
- Character images (
stewie.png,peter.png) are stored locally. - Gameplay footage videos are pre-stored, you can add any footage in reel size video in video assests folder
- DuckDuckGo scraping is used to find additional relevant images if needed.
- Using Python’s
moviepy, the audio clips, character images, and gameplay footage are synchronized and combined into the final video. - Each dialogue line is paired with the corresponding character’s image and AI voice clip.
- The Telegram bot notifies users about job status, errors, or when the video is ready.
- Users can send new scripts or topics directly to the bot.
- When the video is ready, it is sent directly back to the Telegram user.
- You always receive your video, even if posting fails.
- Auto-posting is available via Instagram Graph API.
- Since IP address changes with EC2, this is best handled via a cron job if a valid session/IP is known.
- You can also manually post using the Telegram-delivered video.
- Python 3.9+
- AWS account with:
- EC2 instance for voice scraping
- CloudWatch + Lambda to manage EC2 lifecycle and IP rotation
- Telegram Bot Token
- OpenAI API key (optional, for manual ChatGPT use outside project)
Below is an example of how the script content is structured to generate the videos. The audio field paths are managed internally and are omitted here for privacy.
[
{
"audio": "[path to Peter's audio clip]",
"image": "peter.png",
"dialogue": "Peter: Hello Indian dev! You’ve seen reels like this, right?",
"character": "peter",
"image_search": "indian developer"
},
{
"audio": "[path to Stewie's audio clip]",
"image": "stewie.png",
"dialogue": "Stewie: Yeah! Those viral AI voice skits? Everyone’s reposting this one.",
"character": "stewie",
"image_search": "viral ai reel"
},
{
"audio": "[path to Peter's audio clip]",
"image": "peter.png",
"dialogue": "Peter: I built the automation for this. No paid AI, all open source!",
"character": "peter",
"image_search": "automation setup"
}
]
## 📄 Sample Content Format
Below is an example of how the script content is structured to generate the videos. The `audio` field paths are managed internally and are omitted here for privacy.
```json
[
{
"audio": "[path to Peter's audio clip]",
"image": "peter.png",
"dialogue": "Peter: Hello Indian dev! You’ve seen reels like this, right?",
"character": "peter",
"image_search": "indian developer"
},
{
"audio": "[path to Stewie's audio clip]",
"image": "stewie.png",
"dialogue": "Stewie: Yeah! Those viral AI voice skits? Everyone’s reposting this one.",
"character": "stewie",
"image_search": "viral ai reel"
},
{
"audio": "[path to Peter's audio clip]",
"image": "peter.png",
"dialogue": "Peter: I built the automation for this. No paid AI, all open source!",
"character": "peter",
"image_search": "automation setup"
}
]Before running the script, make sure the following system-level dependencies are installed:
- FFmpeg: Required by
moviepyandpydubfor audio/video processing. - ImageMagick: Used for image manipulation and required for certain operations by
moviepyorimageio. - imageio: Python library used for reading/writing images, often works with
moviepy.
sudo apt update
sudo apt install ffmpeg imagemagick
pip install imageio- The main automation service runs via
flow_main.py. - Run it as a background service or use process managers like
systemd,pm2, orscreen/tmuxto keep it alive. - This script keeps the Telegram bot live and handles the entire workflow end-to-end.




