A powerful application for creating interactive video memes with realistic animation using Segmind, an advanced AI video generation technology.
- Realistic AI Video Generation: Utilizes Segmind's state-of-the-art AI for high-quality video generation
- Multiple Meme Templates: Choose from popular meme templates (Lil Yachty, PSY)
- Simple Interface: Easy-to-use interface for uploading images and generating memes
- Download & Share: Easily download and share your creations
- Fallback Mechanisms: Automatic fallback to basic video processing if AI is unavailable
This application consists of:
- Frontend: React-based client for user interactions
- Backend: Node.js/Express server for processing and video generation
- Segmind Integration: API integration with Segmind's video generation service
- Fallback Mechanism: Basic ffmpeg overlay as a reliable fallback
- Node.js 16+ and npm
- ffmpeg (required for video processing)
-
Clone the repository:
git clone https://github.com/yourusername/video-meme.git cd video-meme -
Install dependencies:
npm run install-all -
Set up the Segmind API key (optional but recommended):
- Get your API key from Segmind
- Create a
.envfile in the server directory based on.env.example:SEGMIND_API_KEY=your_segmind_api_key_here
-
Start the development server:
npm run dev -
Open your browser and navigate to
http://localhost:5173
This application is set up to use Segmind AI for advanced video generation. Segmind is a cutting-edge AI model developed by Alibaba that specializes in:
- Image-to-Video generation (primarily used in this app)
- Text-to-Video generation
- Video editing and enhancement
- API Integration: When enabled, the app communicates with the Segmind API service
- Image Processing: Your uploaded image is processed by Segmind's I2V-14B-720P model
- Motion Synthesis: The AI generates natural movement based on the meme template context
- Full-Body Replacement: Unlike simple face swaps, Segmind can generate full-body motion
- High Resolution Output: Outputs videos at 720p resolution with realistic motion
The Segmind API requires an API key for access. To obtain one:
- Visit Segmind
- Sign up for an account and purchase API credits
- Copy your API key and add it to the
.envfile in the server directory:SEGMIND_API_KEY=your_segmind_api_key_here - Restart the server if it's already running
If Segmind is not available (no API key or service errors), the application will try:
- Basic ffmpeg overlay: Simple image overlay as a last resort
- Select a Template: Choose between Lil Yachty or PSY templates
- Upload Your Image: Upload an image containing a face (preferably a headshot)
- Generate Meme: Click the "Generate Meme" button
- Download or Share: Once the meme is generated, you can download it or share it
- "Failed to generate meme": Check if the Segmind API key is correctly configured
- Slow video generation: Segmind processing can take time (30 seconds to 2 minutes typically)
- Installation issues: Ensure all dependencies are installed, including ffmpeg
POST /api/generate-meme: Generate a meme with the provided image and templateGET /api/meme-templates: List available meme templatesGET /api/segmind-status: Check if Segmind API is configured
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Segmind by Alibaba Cloud
- All original meme creators and communities