Skip to content

Article2VideoMagic 是一个自动化视频生成工具,能够将任意文章转化为生动有趣的短视频。Article2VideoMagic is an innovative automated video generation tool that intelligently transforms any article into engaging dialogue videos.

Notifications You must be signed in to change notification settings

chenwr727/Article2VideoMagic

Repository files navigation

English | 简体中文

Article2VideoMagic

🎬 Turn any article into engaging video content with a single click!

license stars forks

📖 Project Introduction

Article2VideoMagic is an innovative automated video generation tool that can intelligently convert any article into lively and interesting dialogue videos. This project draws inspiration from NotebookLlama and leverages advanced AI technology to achieve full-process automation from text to video production.

✨ Key Features

  • 🤖 Smart Content Understanding - Automatically extract the essence of articles and deeply understand the main theme.
  • 🎭 Multi-role Dialogue - AI-driven dialogue generation makes content more vivid and engaging.
  • 🔍 Smart Material Matching - Semantic-based intelligent matching of video materials.
  • 🗣️ AI Voice Synthesis - Natural and smooth multi-role dubbing system.
  • 🎥 Professional Video Production - Automatic editing and synthesis to create refined video content.

📂 Examples

Note: The following example videos have been edited and compressed, showing only part of the effect. Complete videos can be generated by clicking the title to view the original article.

▶️ "The Embarrassment of Being Seated at the Kids' Table in Europe" ▶️ "How Northeastern Billionaires Stay Relevant After Nezha's Success" ▶️ "Non-invasive Glucose Monitoring Devices: Making Life Easier with Technology"
11.mp4
12.mp4
14.mp4

🎯 Application Scenarios

  • 📰 News Information Videos - Quickly convert hot news into short videos.
  • 📚 Article Content Visualization - Make article content more expressive.
  • 🎤 Podcast Content Creation - Automatically generate conversational podcasts.
  • 📱 Short Video Content Production - Mass-produce high-quality short videos.
  • 🎮 Game Information to Video - Video presentation of game strategies and news.

🛠️ Technology Stack

  • Backend Framework: FastAPI
  • Frontend Interface: Streamlit
  • AI Service: OpenAI GPT API
  • Voice Synthesis: Tongyi TTS
  • Video Processing: FFmpeg
  • Data Storage: SQLite

🚀 Quick Start

Environment Requirements

  • Python 3.10+
  • FFmpeg
  • ImageMagick

Installation Steps

  1. Clone the repository:
git clone https://github.com/chenwr727/Article2VideoMagic.git
cd Article2VideoMagic
  1. Create and activate conda environment:
conda create -n url2video python=3.10
conda activate url2video
  1. Install dependencies:
pip install -r requirements.txt
conda install -c conda-forge ffmpeg

Configuration

  1. Copy the configuration template:
copy config-template.toml config.toml
  1. Edit config.toml and configure the following necessary parameters:
  • OpenAI API key
  • Tongyi TTS service key
  • Pexels API key
  • Other optional configurations

📂 Project Structure

Article2VideoMagic/
├── api/                    # API interface module
│   ├── crud.py             # Database operations
│   ├── database.py         # Database configuration
│   ├── models.py           # Data models
│   ├── router.py           # Route definitions
│   └── service.py          # Business logic
├── schemas/                # Data model definitions
│   ├── config.py           # Configuration model
│   ├── task.py             # Task model
│   └── video.py            # Video model
├── services/               # External service integration
│   ├── llm.py              # LLM service
│   ├── pexels.py           # Video material service
│   ├── tts.py              # Voice synthesis service
│   └── video.py            # Video processing service
├── utils/                  # Utility modules
│   ├── config.py           # Configuration management
│   ├── log.py              # Logging tools
│   ├── subtitle.py         # Subtitle handling
│   ├── text.py             # Text processing
│   └── video.py            # Video tools
└── web.py                  # Web interface entry point

🖥️ Usage

Web Interface

  1. Start the service:
python app.py
  1. Launch the web interface:
streamlit run web.py --server.port 8000

Command Line Usage

Process a single URL:

python main.py https://example.com/article

🤝 Contribution Guide

Contributions are welcome! Please follow these steps:

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Submit a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • NotebookLlama - Inspiration for this project
  • All contributors and users

About

Article2VideoMagic 是一个自动化视频生成工具,能够将任意文章转化为生动有趣的短视频。Article2VideoMagic is an innovative automated video generation tool that intelligently transforms any article into engaging dialogue videos.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published