新增示例库逻辑

This commit is contained in:
puke
2025-11-03 17:44:33 +08:00
parent 6f114b61c7
commit ec395196cd
43 changed files with 2567 additions and 406 deletions

42
docs/en/user-guide/api.md Normal file
View File

@@ -0,0 +1,42 @@
# API Usage
Pixelle-Video provides a complete Python API for easy integration into your projects.
---
## Quick Start
```python
from pixelle_video.service import PixelleVideoCore
import asyncio
async def main():
# Initialize
pixelle = PixelleVideoCore()
await pixelle.initialize()
# Generate video
result = await pixelle.generate_video(
text="Why develop a reading habit",
mode="generate",
n_scenes=5
)
print(f"Video generated: {result.video_path}")
# Run
asyncio.run(main())
```
---
## API Reference
For detailed API documentation, see [API Overview](../reference/api-overview.md).
---
## Examples
For more usage examples, check the `examples/` directory in the project.

View File

@@ -0,0 +1,48 @@
# Template Development
How to create custom video templates.
---
## Template Introduction
Video templates use HTML to define the layout and style of video frames.
---
## Template Structure
Templates are located in the `templates/` directory, grouped by size:
```
templates/
├── 1080x1920/ # Portrait
├── 1920x1080/ # Landscape
└── 1080x1080/ # Square
```
---
## Creating Templates
1. Copy an existing template file
2. Modify HTML and CSS
3. Save to the corresponding size directory
4. Select and use in Web interface
---
## Template Variables
Templates support the following variables:
- `{{ title }}` - Video title
- `{{ text }}` - Scene text
- `{{ image }}` - Scene image
---
## More Information
Detailed template development guide coming soon.

View File

@@ -0,0 +1,77 @@
# Web UI Guide
Detailed introduction to the Pixelle-Video Web interface features.
---
## Interface Layout
The Web interface uses a three-column layout:
- **Left Panel**: Content input and audio settings
- **Middle Panel**: Voice and visual settings
- **Right Panel**: Video generation and preview
---
## System Configuration
First-time use requires configuring LLM and image generation services. See [Configuration Guide](../getting-started/configuration.md).
---
## Content Input
### Generation Mode
- **AI Generate Content**: Enter a topic, AI creates script automatically
- **Fixed Script Content**: Enter complete script directly
### Background Music
- Built-in music supported
- Custom music files supported
---
## Voice Settings
### TTS Workflow
- Select TTS workflow
- Supports Edge-TTS, Index-TTS, etc.
### Reference Audio
- Upload reference audio for voice cloning
- Supports MP3/WAV/FLAC formats
---
## Visual Settings
### Image Generation
- Select image generation workflow
- Set image dimensions
- Adjust prompt prefix to control style
### Video Template
- Choose video template
- Supports portrait/landscape/square
- Preview template effects
---
## Generate Video
After clicking "Generate Video", the system will:
1. Generate video script
2. Generate images for each scene
3. Synthesize voice narration
4. Compose final video
Automatically previews when complete.

View File

@@ -0,0 +1,37 @@
# Workflow Customization
How to customize ComfyUI workflows to achieve specific functionality.
---
## Workflow Introduction
Pixelle-Video is built on the ComfyUI architecture and supports custom workflows.
---
## Workflow Types
### TTS Workflows
Located in `workflows/selfhost/` or `workflows/runninghub/`
### Image Generation Workflows
Located in `workflows/selfhost/` or `workflows/runninghub/`
---
## Custom Workflows
1. Design your workflow in ComfyUI
2. Export as JSON file
3. Place in `workflows/` directory
4. Select and use in Web interface
---
## More Information
Detailed workflow customization guide coming soon.