+
Skip to content

mblanc/storycraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

StoryCraft

An AI-powered video storyboard generation platform that transforms text descriptions into complete video narratives using Google's generative AI models. Create cinematic scenes, generate voiceovers, compose music, and export professional videos with a modern web interface.

Description

StoryCraft leverages Google's Imagen 4.0 for image generation, Veo 3.0 for video creation, Chirp 3 for voice synthesis, and Lyria 2 for music generation. The application provides a complete workflow from story concept to finished video, featuring a timeline-based editor for precise control over video composition.

Interesting Techniques

  • Web Audio API Integration: Real-time audio waveform visualization using AudioContext and AnalyserNode for dynamic audio analysis
  • FFmpeg Video Processing: Server-side video concatenation, audio mixing, and overlay composition using fluent-ffmpeg
  • Timeline-Based Editing: Custom drag-and-drop timeline interface with real-time preview and audio synchronization
  • Google Cloud Storage Integration: Signed URL generation for secure media file access and storage
  • Exponential Backoff Retry Logic: Robust error handling with jitter for AI API calls
  • CSS Custom Properties: Dynamic theming system using CSS custom properties for consistent design tokens

Technologies & Libraries

Project Structure

storycraft/
├── app/                    # Next.js App Router pages and components
│   ├── actions/           # Server actions for AI generation and file operations
│   ├── api/              # API routes for scene and video endpoints
│   ├── components/       # React components organized by feature
│   │   ├── create/       # Story creation interface
│   │   ├── editor/       # Timeline-based video editor
│   │   ├── scenario/     # Story scenario management
│   │   ├── storyboard/   # Scene editing and management
│   │   ├── video/        # Video playback and export
│   │   └── ui/           # Reusable UI components
│   ├── fonts/            # Custom font files
│   └── globals.css       # Global styles and CSS variables
├── components/           # Shared UI components
├── lib/                  # Core utilities and external service integrations
├── public/               # Static assets including sample media files
│   ├── music/           # Background music tracks
│   ├── styles/          # Visual style reference images
│   ├── tts/             # Generated text-to-speech audio
│   └── uploads/         # User-uploaded content
└── Dockerfile           # Container configuration for deployment

Key Directories:

  • app/actions/ - Contains server actions for AI generation, video processing, and file management
  • app/components/editor/ - Houses the sophisticated timeline editor with audio visualization and real-time preview
  • lib/ - Core utilities including FFmpeg video processing, Google Cloud integrations, and AI model wrappers
  • public/music/ - Curated background music library organized by mood and genre

Deployment

StoryCraft can be deployed to Google Cloud Run for scalable, serverless hosting. The application includes a Dockerfile for containerization and is optimized for Cloud Run's execution environment. To deploy:

  1. Ensure you have the Google Cloud CLI installed and configured
  2. Set up your Google Cloud project with the required APIs enabled (Vertex AI, Cloud Storage, Text-to-Speech)
  3. Configure environment variables for your AI model endpoints and storage buckets
  4. Deploy using the command: gcloud run deploy --source .

The application will automatically scale based on demand and only incur costs when actively processing video generation requests.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载