Skip to content

Latest commit

 

History

History
422 lines (317 loc) · 16.4 KB

File metadata and controls

422 lines (317 loc) · 16.4 KB



🎬 Sora2 Short Drama Video Creation Plugin

Version License Nuxt 3 BuildingAI Extension Sora2 AI

👉 Try the App Marketplace Now

🚀 Sora2 is an AI-powered intelligent video generation tool focused on efficient and high-quality video creation. It deeply understands user text prompts and quickly transforms creative ideas into visually rich video content!

Simply describe your creative concept to generate exquisite video works, making every idea efficiently realized


📖 Table of Contents


🖼️ Interface Preview

Inspiration Gallery

Browse featured video cases, get creative inspiration, and quickly create with one-click parameter reuse.

Generation History

View historical generation records with support for regeneration, download, and deletion.

Video Playback

Video detail playback interface with one-click clone and download functionality.


🎯 Product Introduction

What is Sora2 Short Drama Video Plugin?

Sora2 Short Drama Video Creation is an extension plugin specifically designed for the BuildingAI platform. Based on the advanced Sora 2.0 engine, it focuses on intelligent generation of short dramas and creative videos. The plugin deeply integrates with BuildingAI's user system, computing power management, and storage services to provide users with a seamless video creation experience.

Core Value

Value Point Description
🎨 Zero Barrier Creation No need to learn complex video editing software, create with text input
Efficient Generation Support for multiple video durations with optimized computing power
🎬 Professional Quality Adaptive landscape and portrait modes with multiple preset styles
💡 Inspiration Spark Built-in case library with rich creative templates and examples
💰 Cost Control Credit-based billing, pay-as-you-go with transparent pricing

Use Cases

  • 📱 Short Drama Creation - Quickly generate short drama clips and creative video content
  • 🎨 Creative Design - Create dynamic showcase effects for design proposals
  • 📚 Education & Training - Produce instructional demonstration videos and animated explanations
  • 🛒 E-commerce Marketing - Generate product showcase and advertising videos
  • 🎮 Gaming & Entertainment - Create game trailers and character animations
  • 🌟 Personal Creation - Realize imaginative creative ideas

✨ Features

Core Features

Feature Description Icon
Text-to-Video Input text description, Sora2 automatically generates corresponding video content 📝➡️🎬
Image-to-Video Upload reference images, AI generates dynamic videos based on images 🖼️➡️🎬
Landscape & Portrait Support Intelligently recognizes and supports portrait and landscape modes 📐
Multiple Duration Options Support for various video duration configurations to meet different creative needs ⏱️
Preset Styles Support for custom preset styles for quick parameter reuse 🎨
Model Selection Support for sora-2 and sora-2-pro models to meet different quality requirements 🚀

Auxiliary Features

Feature Description
🌟 Case Library Browse featured video cases for creative inspiration and reference
📜 Generation History Automatically save all generation records with support for viewing, downloading, and deletion
🔄 Task Polling Real-time tracking of generation progress with automatic status updates
💾 Local Storage Support for local video storage ensuring data security and control
🌐 Multi-language Support for Chinese, English, and Japanese interfaces
🎛️ Admin Configuration Complete backend configuration management with API key and credit settings

🛠 Technical Architecture

Technology Stack

BuildingAI Extension Architecture:

  • Extension Framework: BuildingAI Extension SDK v25.1.0+
  • Frontend Technology: Nuxt 3 + Vue 3 + TypeScript
  • UI Components: BuildingAI UI Component Library + Nuxt UI
  • Video Components: vue-waterfall-plugin-next (waterfall layout)
  • Backend Integration: BuildingAI Core + Service + HTTP Module
  • Database: BuildingAI DB (PostgreSQL + TypeORM)
  • User System: BuildingAI unified user authentication and permission management
  • Storage Service: BuildingAI unified storage service

Core Dependencies:

  • AI Engine: Sora 2.0 API Integration
  • Computing Power Management: BuildingAI credit billing system
  • Multi-language: BuildingAI i18n internationalization
  • Build Tools: tsup + concurrently

Project Structure

buildingai-sora2/
├── src/
│   ├── api/                      # Backend extension modules
│   │   ├── db/                   # Database layer
│   │   │   ├── entities/         # Entity definitions
│   │   │   │   ├── sora-record.entity.ts    # Generation records
│   │   │   │   ├── sora-config.entity.ts    # Configuration management
│   │   │   │   ├── sora-case.entity.ts      # Case library
│   │   │   │   └── sora-preset.entity.ts    # Preset management
│   │   │   ├── migrations/       # Database migrations
│   │   │   └── seeds/           # Seed data
│   │   └── modules/             # Business modules
│   │       ├── web/             # Frontend API endpoints
│   │       ├── console/         # Admin console endpoints
│   │       └── example/         # Example modules
│   └── web/                     # Frontend application
│       ├── components/          # Vue components
│       │   └── VideoWaterfall.vue  # Video waterfall component
│       ├── pages/               # Route pages
│       │   ├── index.vue        # Main page
│       │   └── console/         # Admin pages
│       ├── services/            # API service layer
│       │   ├── web/generate.ts  # Generation service
│       │   └── console/         # Admin services
│       ├── stores/              # State management
│       ├── i18n/                # Multi-language
│       └── models/              # Type definitions
├── manifest.json                # Extension manifest
└── package.json                # Project configuration

Core Workflow

Video Generation Flow Diagram

sequenceDiagram
    participant User as User
    participant WebUI as Frontend UI
    participant Extension as Extension Backend
    participant BuildingAI as BuildingAI Platform
    participant SoraAPI as Sora2 API
    participant Storage as Storage Service
    
    User->>WebUI: 1. Input description/Upload image
    WebUI->>Extension: 2. Submit generation request
    Extension->>BuildingAI: 3. Verify user permissions and credits
    BuildingAI-->>Extension: 4. Return verification result
    Extension->>SoraAPI: 5. Create video task
    SoraAPI-->>Extension: 6. Return task ID
    
    loop Poll task status
        Extension->>SoraAPI: 7. Query task status
        SoraAPI-->>Extension: 8. Return status/progress
        Extension->>WebUI: 9. Update progress
    end
    
    SoraAPI-->>Extension: 10. Return video URL
    Extension->>Storage: 11. Download and save video
    Extension->>BuildingAI: 12. Deduct credits/Save record
    Extension-->>WebUI: 13. Return generation result
    WebUI-->>User: 14. Display video
Loading

Detailed Step Description

  1. User Input: User inputs video description (Prompt), selects duration, orientation and other parameters, optionally uploads reference images
  2. Frontend Processing: Image compression, parameter validation, Base64 encoding
  3. Permission Verification: Verify user permissions and credit balance through BuildingAI platform
  4. Task Creation: Call Sora2 API to create video generation task, supporting sora-2 and sora-2-pro models
  5. Status Polling: Periodically poll task status (processing → completed/failed), real-time progress updates
  6. Result Processing: Download generated video to local storage (configurable)
  7. Data Recording: Save generation record in SoraRecord table, including prompt, parameters, results, etc.
  8. Credit Deduction: Deduct corresponding credits according to configured credit rules
  9. Result Display: Frontend waterfall display of videos with support for playback, download, deletion, etc.

📱 User Manual

User Guide

Step 1: Enter Plugin Page

Find and click the "Sora2 Short Drama Video Creation" plugin in the BuildingAI platform to enter the video generation page. The page includes:

  • Video Generation Area: Input prompts and parameter settings
  • Inspiration Gallery: Browse featured video cases for creative inspiration
  • My Works: View personal historical generation records (waterfall display)

Step 2: Input Video Description

Describe the video content you want to generate in the text input box.

💡 Prompt Tips:

✅ Good prompt example:
"A young girl walks slowly in a park with cherry blossoms flying,
sunlight shines through the petals on her face, the camera follows slowly,
the scene is beautiful and romantic, short drama style"

❌ Avoid prompts like:
"Girl walking"

Recommended Prompt Elements:

  • 🎯 Subject: Describe the main character or object in the video
  • 🎨 Scene: Specify the scene environment and atmosphere
  • 💡 Emotion: Describe the emotional tone you want to express
  • 📷 Camera: Specify shooting method (tracking, fixed, push-pull, etc.)
  • 🎬 Style: Indicate style such as short drama, film, documentary, etc.

Step 3: Configure Generation Parameters

Parameter Options Description
Duration Multiple duration options Select appropriate duration based on needs
Orientation Portrait / Landscape System automatically determines based on aspect ratio
Model sora-2 / sora-2-pro Pro version has higher quality but consumes more credits
Preset Style Custom presets Save commonly used parameter combinations
Reference Image Optional upload Support for image compression and Base64 processing

Step 4: Start Generation

After confirming parameters, click the "Generate Video" button. The system will:

  1. Verify credit balance
  2. Create generation task
  3. Real-time polling of progress (updates every 8 seconds)
  4. Automatically download and save video (if local storage is configured)

Step 5: Manage Works

In the waterfall-displayed works area, you can:

  • 🎬 Preview Playback: Auto-play preview on hover
  • 💾 Download Video: Save to local device
  • 🔄 Reuse Parameters: One-click regeneration with same parameters
  • 🗑️ Delete Record: Remove unwanted generation records
  • 📊 View Details: Check credit consumption, generation time, and other information

Admin Console Configuration

Administrators can configure the following in the backend:

1. API Key Configuration

Path: Console → Video Configuration → Key Configuration

Configuration Item Description
API URL Sora 2.0 API address (default: https://api.openai.com/v1)
Access Key OpenAI access key ID
Secret Key OpenAI secret key

2. Credit Consumption Configuration

Path: Console → Video Configuration → Billing Configuration

Video Specification Default Credits Description
720P + 5s 300 Standard definition short video
720P + 10s 500 Standard definition medium video
720P + 20s 800 Standard definition long video
1080P + 5s 600 High definition short video
1080P + 10s 1000 High definition medium video
1080P + 20s 1600 High definition long video
4K + 5s 1200 Ultra HD short video
4K + 10s 2000 Ultra HD medium video
4K + 20s 3200 Ultra HD long video

3. Inspiration Management

Path: Console → Inspiration Management

  • Add Inspiration: Upload excellent video cases as inspiration showcase
  • Edit Inspiration: Modify inspiration description, sorting, and other information
  • Display Control: Control whether inspiration is displayed on frontend
  • Delete Inspiration: Remove unwanted inspiration cases

4. Example Configuration

Path: Console → Video Configuration → Example Configuration

Configure the prompt library used by the "Random Example" feature to help users quickly get creative inspiration.


💰 Credit System

Billing Rules

The system uses credit-based billing, with different video specifications consuming different credits:

Resolution Duration Default Credits Description
720P 5s 300 Standard definition short
720P 10s 500 Standard definition medium
720P 20s 800 Standard definition long
1080P 5s 600 High definition short
1080P 10s 1000 High definition medium
1080P 20s 1600 High definition long
4K 5s 1200 Ultra HD short
4K 10s 2000 Ultra HD medium
4K 20s 3200 Ultra HD long

❓ FAQ

Q1: What to do if video generation fails?

Possible causes and solutions:

  • ✅ Check if credit balance is sufficient
  • ✅ Check if API key configuration is correct
  • ✅ Check if network connection is normal
  • ✅ Try simplifying the prompt and regenerate

Q2: Video quality is not ideal?

Optimization suggestions:

  • 📝 Use more detailed and specific prompt descriptions
  • 🖼️ Upload high-quality reference images
  • 🎬 Select higher resolution (1080P or 4K)
  • 🔄 Generate multiple times and select the best result

Q3: How to obtain Sora 2.0 API key?

  1. Visit OpenAI Console
  2. Register/Login to account
  3. Enable "Sora" service
  4. Create API Key in "API Keys"
  5. Configure the key in admin console

Q4: What video aspect ratios are supported?

Supports the following 6 common aspect ratios:

  • 21:9 - Cinematic widescreen
  • 16:9 - Standard landscape (recommended)
  • 4:3 - Traditional ratio
  • 1:1 - Square
  • 3:4 - Portrait
  • 9:16 - Mobile portrait (short video recommended)

Q5: Can generated videos be used commercially?

Please refer to OpenAI Sora's terms of service to ensure usage of generated content is within compliance.


📄 License

This project is released under the BuildingAI License.


🤝 Contact Us


🎬 Let AI give wings to your creativity!