Turn Reddit posts into engaging videos with automatic text-to-speech conversion and video generation! 🎥🚀
- 🔍 Fetch Reddit Stories: Automatically fetch stories from Reddit using a post URL.
- 🗣 Text-to-Speech: Convert the post title and body into audio using high-quality voice models.
- 🎬 Video Creation: Generate videos with synchronized captions from the Reddit story.
- 🎨 Custom Styling: Adjust captions, fonts, and styles to make each video unique.
- 🎶 Background Music: Add audio to create a fully-voiced video output.
-
Clone the repository:
git clone https://github.com/your-username/reddit-story-to-video.git cd reddit-story-to-video -
Install the dependencies:
pip install -r requirements.txt
-
Set up your
.envfile with your API keys:REDDIT_CLIENT_ID=your_client_id REDDIT_CLIENT_SECRET=your_client_secret ELEVENLABS_API_KEY=your_elevenlabs_api_key
-
Run the script:
python reddit_video_generator.py
-
Enter the Reddit post URL when prompted:
Enter the Reddit post URL: https://www.reddit.com/r/... -
Watch as the script fetches the post, converts the text into speech, generates a video, and combines it with the audio.
-
Find your generated video in the
output/directory! 🎉
reddit-story-to-video/
├── video/ # Sample video clips for background
├── font/ # Custom fonts for captions
├── frames/ # Temporary directory for frames
├── output/ # Final video output directory
├── images/ # Images for the README
├── .env # Store API keys here
├── reddit_video_generator.py # Main script
├── requirements.txt # Python dependencies
└── README.md # Project documentation
###Here's an example of how the output might look:
Example of the generated video thumbnail.
A frame from the video showing a caption extracted from the Reddit post.
Check out a sample video generated using this tool:
- Python 🐍
- PRAW for Reddit API integration
- MoviePy for video editing
- PIL/Pillow for image manipulation
- OpenCV for frame extraction and processing
Feel free to fork this project, create a new branch, and submit a pull request. Contributions are always welcome! 😊
This project is licensed under the MIT License - see the LICENSE file for details.
- Reddit API for providing access to Reddit posts.
- ElevenLabs for the high-quality text-to-speech services.
If you have any questions or suggestions, feel free to reach out at Instagram.
