AI Integration · Case study
AI Generated Explainer Videos
AI-powered system that creates explainer videos by scraping websites and generating complete video content.
The challenge
Businesses needed high-quality explainer videos but video production was time-consuming and expensive.
What I built
Created an AI system that scrapes client websites, generates scripts, creates images, voice-overs, and combines everything into professional explainer videos using Remotion.js and AWS Lambda.
Results
- Automated complete video production pipeline
- Generated professional explainer videos from websites
- Reduced video creation time significantly
- Scalable solution using AWS Lambda
Tech stack
- Next.js
- OpenAI API
- Remotion.js
- n8n
- AWS Lambda
Code sketch
A simplified illustration of the core logic, not production code.
// AI Video Generation Pipeline
const generateExplainerVideo = async (websiteUrl) => {
// Step 1: Scrape website for key information
const websiteData = await scrapeWebsite(websiteUrl);
// Step 2: Generate script using OpenAI
const script = await openai.createCompletion({
model: "gpt-4",
prompt: `Create explainer video script for: ${websiteData.services}`,
max_tokens: 1000
});
// Step 3: Generate images and voice-over
const [images, voiceOver] = await Promise.all([
generateImages(script.scenes),
generateVoiceOver(script.narration)
]);
// Step 4: Combine using Remotion.js
const videoAssets = await remotion.renderVideo({
composition: 'ExplainerVideo',
props: { script, images, voiceOver }
});
// Step 5: Render on AWS Lambda
return await awsLambda.renderFinalVideo(videoAssets);
};