Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alaminfirdows/vision-ai-video-narration-php
Generate voice narration for videos by analyzing frames with OpenAI's API and combine the narration with the video using `PHP-FFmpeg` to ensure seamless synchronization. Great for adding context or commentary to video content.
https://github.com/alaminfirdows/vision-ai-video-narration-php
ffmpeg narrative-generation openai visionai
Last synced: about 1 month ago
JSON representation
Generate voice narration for videos by analyzing frames with OpenAI's API and combine the narration with the video using `PHP-FFmpeg` to ensure seamless synchronization. Great for adding context or commentary to video content.
- Host: GitHub
- URL: https://github.com/alaminfirdows/vision-ai-video-narration-php
- Owner: alaminfirdows
- Created: 2024-01-25T17:16:28.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-04-28T15:32:16.000Z (8 months ago)
- Last Synced: 2024-04-29T16:32:10.942Z (8 months ago)
- Topics: ffmpeg, narrative-generation, openai, visionai
- Language: PHP
- Homepage:
- Size: 669 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Video Narration with OpenAI and FFmpeg
This project uses OpenAI's API to extract text information from video frames and generate voice narration. It integrates `PHP-FFmpeg` to combine the generated voice with the original video. The goal is to create a seamless narration that matches the visual content.
## Features
- **Frame Analysis**: Uses OpenAI's API to analyze video frames and extract text.
- **Text-to-Speech**: Converts extracted text into voice narration.
- **Video Editing**: Integrates `PHP-FFmpeg` to merge the generated voice with the video.
- **Synchronization**: Ensures the voice narration syncs accurately with the video content.## Getting Started
To run this project, you'll need:
- PHP and the `PHP-FFmpeg` library installed
- Access to OpenAI's API for text analysis and text-to-speech
- A sample video file to process## Installation
1. Clone the repository:
```bash
git clone [email protected]:alaminfirdows/vision-ai-video-narration-php.git
```2. Install the required dependencies:
```bash
composer install
```3. Set up your OpenAI API key in `src/Application.php`:
```php
$this->openAi = OpenAI::client(''); // Add your OpenAI API key here
```4. Run the script to generate a new video with voice narration:
```bash
hp -S localhost:8080 -t index.php
```5. Access the script in your browser:
```bash
http://localhost:8080
```## Usage
1. Extract text information from video frames using OpenAI's API.
2. Convert the extracted text into voice narration.
3. Combine the narration with the original video using `PHP-FFmpeg`.
4. Output a new video with voice narration.## Contributing
Contributions and feedback are welcome! Please feel free to submit issues or pull requests to improve the project.